提交 9d781e8d 作者: 陈晨

commit

## GameSDKV1.0文档接入使用
## GameSDKV1.0文档接入使用
......@@ -93,11 +93,11 @@
#### 1、对接说明 <a name="sec1"></a>
&nbsp;&nbsp; 1.1、此对接文档只适合与sdkv1.0.52.22版本。
&nbsp;&nbsp; 1.1、此对接文档只适合与sdkv1.0.52.25
&nbsp;&nbsp; 1.2、所有SDK功能在GameSDK类中,可通过初始化获取改类对象,后续所有更新功能都调用这个类中方法完成
&nbsp;&nbsp; 1.3、文档中所有GameSDK指S从平台获取arr文件或者远程依赖implementation("com.zw.game.sdk:gameSDk:1.0.52.23")
&nbsp;&nbsp; 1.3、文档中所有GameSDK指S从平台获取arr文件或者远程依赖implementation("com.zw.game.sdk:gameSDk:1.0.52.25")
&nbsp;&nbsp; 1.4、开发工具:要求使用Android Studio 3.0版本及以上,Gradle版本建议5.4.1版本及以上,Gradle插件(Android gradle plugin)版本建议3.2.2版本及以上,- Android SDK版本:最低支持Android 5.0版本(minSdkVersion>=21),targetSdkVersion不支持30以上,建议targetSdkVersion=28;
......@@ -113,7 +113,7 @@
#### 3.1、在app工程目录build.gradle中添加依赖<a name="sec3.1"></a>
```
implementation("com.zw.game.sdk:gameSDk:1.0.52.23")
implementation("com.zw.game.sdk:gameSDk:1.0.52.25")
```
......
No preview for this file type
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
# Default ignored files
/shelf/
/workspace.xml
My Application
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveExternalAnnotations" value="false" />
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven4" />
<option name="name" value="maven4" />
<option name="url" value="https://repo1.maven.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven3" />
<option name="name" value="maven3" />
<option name="url" value="https://www.jitpack.io" />
</remote-repository>
<remote-repository>
<option name="id" value="maven5" />
<option name="name" value="maven5" />
<option name="url" value="https://artifact.bytedance.com/repository/Volcengine/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://jitpack.io2" />
</remote-repository>
<remote-repository>
<option name="id" value="maven6" />
<option name="name" value="maven6" />
<option name="url" value="https://artifact.bytedance.com/repository/ttgamesdk/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="https://jitpack.io" />
</remote-repository>
<remote-repository>
<option name="id" value="maven7" />
<option name="name" value="maven7" />
<option name="url" value="https://maven.aliyun.com/repository/jcenter" />
</remote-repository>
<remote-repository>
<option name="id" value="maven8" />
<option name="name" value="maven8" />
<option name="url" value="https://maven.aliyun.com/repository/google" />
</remote-repository>
<remote-repository>
<option name="id" value="maven9" />
<option name="name" value="maven9" />
<option name="url" value="https://maven.aliyun.com/repository/central" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
plugins {
id 'com.android.application'
id 'kotlin-android'
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.liuxiaotian.xiaofengye"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = ['src/main/java', 'src/main/aidl']
resources.srcDirs = ['src/main/java', 'src/main/aidl']
aidl.srcDirs = ['src/main/aidl']
res.srcDirs = ['src/main/res']
assets.srcDirs = ['src/main/assets']
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'LICENSE.txt'
exclude 'META-INF/DEPENDENCIES'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation fileTree(dir: 'libs', includes: ['*.aar'])
implementation fileTree(dir: 'libs', includes: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.zwwl.legend.sdk:legend:1.0.1.5'
// implementation 'com.google.android.gms:play-services-auth:20.7.0'
// implementation 'com.google.android.gms:play-services-analytics:17.0.0'
// implementation "com.android.installreferrer:installreferrer:2.0"
implementation 'androidx.multidex:multidex:2.0.1'
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
{
"version": 1,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.liuxiaotian.xiaofengye",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"properties": [],
"versionCode": 1,
"versionName": "1",
"enabled": true,
"outputFile": "app-release.apk"
}
]
}
\ No newline at end of file
package com.liuxiaotian.myapplication
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.example.myapplication", appContext.packageName)
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.liuxiaotian.myapplication">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<application
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MyApplication">
<activity android:name=".game.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> <!-- 添加 Google 登录配置 -->
<meta-data
android:name="game_id"
android:value="1"/>
<meta-data
android:name="main_game_id"
android:value="1"/>
</application>
</manifest>
\ No newline at end of file
package com.liuxiaotian.myapplication;
import android.app.Application;
import android.content.Context;
import android.content.res.Configuration;
import androidx.multidex.MultiDex;
import com.zwwl.overseas.game.module.api.GameApplicationService;
public class App extends Application {
@Override
protected void attachBaseContext(Context base) {
GameApplicationService.getInstance().attachBaseContext(base);
super.attachBaseContext(base);
}
@Override
public void onCreate() {
super.onCreate();
MultiDex.install(this);
GameApplicationService.getInstance().onCreate(this,1);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
GameApplicationService.getInstance().onConfigurationChanged(this);
}
}
package com.liuxiaotian.myapplication.game
import android.os.Bundle
import android.util.Log
import android.view.View
import android.widget.Button
import android.widget.TextView
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.liuxiaotian.myapplication.R
import com.zwwl.overseas.game.module.api.GameService
import com.zwwl.overseas.game.module.calback.InitZyCallback
import com.zwwl.overseas.game.module.calback.OnLoginListener
import com.zwwl.overseas.game.module.calback.OnPlayListener
import com.zwwl.overseas.game.module.calback.RoleInfoCallBack
import com.zwwl.overseas.game.module.model.CustomPayParam
import org.json.JSONObject
import java.util.*
import kotlin.collections.HashMap
class MainActivity : AppCompatActivity() {
private val mBtn: Button by lazy { findViewById<Button>(R.id.btn) }
private val mLoginOut: Button by lazy { findViewById<Button>(R.id.login_out) }
private val mRoleCreate: Button by lazy { findViewById<Button>(R.id.role_create) }
private val mRoleOnline: Button by lazy { findViewById<Button>(R.id.role_online) }
private val mRoleLevelUp: Button by lazy { findViewById<Button>(R.id.role_level_up) }
private val mRoleOffline: Button by lazy { findViewById<Button>(R.id.role_offline) }
private val mRoleOther: Button by lazy { findViewById<Button>(R.id.role_other) }
private val mTvLoginInfo: TextView by lazy { findViewById<TextView>(R.id.tv_login_info) }
private val mTvRoleInfo: TextView by lazy { findViewById<TextView>(R.id.tv_role_info) }
private val mGooglePay: Button by lazy { findViewById<Button>(R.id.btn_goole) }
private val TAG= MainActivity::class.java.simpleName
private var mPayerId=""
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
GameService.getInstance().init(this,"","")
mBtn.setOnClickListener {
gameLogin()
}
mRoleCreate.setOnClickListener {
setRoleReporting("create")
}
mRoleOnline.setOnClickListener {
setRoleReporting("online")
}
mRoleLevelUp.setOnClickListener {
setRoleReporting("level_up")
}
mRoleOffline.setOnClickListener {
setRoleReporting("offline")
}
mRoleOther.setOnClickListener {
setRoleReporting("other")
}
mLoginOut. setOnClickListener { loginOut() }
mGooglePay.setOnClickListener {googlePlay()
}
}
private fun googlePlay(){
val data = CustomPayParam()
val role = CustomPayParam.RoleBean()
val orderInfo = CustomPayParam.OrderBean()
role.event = "other"
role.server_id = "100001"
role.role_name = "主宰传奇"
role.cp_role_id = System.currentTimeMillis().toString() + ""
role.server_name = "主宰服"
role.role_level = "83"
role.role_vip = "0"
orderInfo.cp_order_id = System.currentTimeMillis().toString() + ""
orderInfo.amount = "100"
orderInfo.product_price = "100"
orderInfo.product_id = "1505dian" //Google后台配置商品ID
orderInfo.product_cnt = "1"
orderInfo.product_name = "1元档充值"
orderInfo.product_desc = "商品"
orderInfo.ext = "测试数据"
data.role = role
data.order = orderInfo
GameService.getInstance().googlePlay(data,object :OnPlayListener<Any>{
override fun onSuccess(t: Any?) {
}
override fun onFailure(msg: String?) {
}
})
}
override fun onDestroy() {
super.onDestroy()
GameService.getInstance().onDestroy()
}
private fun setRoleReporting(type:String){
if (mPayerId.isEmpty()){
Toast.makeText(this,"请登录成功在进行角色创建",Toast.LENGTH_LONG).show()
return
}
val map=HashMap<String,String>()
map["attack"] = "0"
map["chapter_index"] = "0"
map["combat_num"] = "0"
map["cp_role_id"] = "0"
map["event"] = type
map["gang_name"] = "unknown"
map["main_city_level"] = "0"
map["online_time"] = "0"
map["power"] = "0"
map["profession"] = "unknown"
map["reiki_num"] = "0"
map["role_level"] = "23"
map["cp_role_id"] = "0"
map["role_name"] = "啊啊啊"
map["role_vip"] = "0"
map["server_id"] = "4433175"
map["server_name"] = "4433175"
map["sponsor_level"] = "0"
map["trans_level"] = "0"
val json= JSONObject()
for ((key, value) in map) {
json.put(key, value)
}
GameService.getInstance().setRoleReporting(json.toString(),"",mPayerId,object :RoleInfoCallBack<Any>{
override fun onSuccess(t: Any?) {
when(type){
"create"->{
mTvRoleInfo.text="创建成功"
}
"online"->{
mTvRoleInfo.text="角色登录完成"
}
"level_up"->{
mTvRoleInfo.text="角色升级完成"
}
"offline"->{
mTvRoleInfo.text="角色退出完成"
}
"other"->{
mTvRoleInfo.text="角色其他状态更改成功"
}
}
}
override fun onFailure(msg: String?) {
}
})
}
private fun gameLogin(){
GameService.getInstance().showLogin(object : OnLoginListener<Any> {
override fun loginSuccess(data: Any) {
Log.e(TAG, "返回数据成功:$data")
val json=JSONObject(data.toString())
val statusCode=json.getInt("status_code")
if (statusCode==1){
mTvLoginInfo.text = json.getJSONObject("data").getString("username")
mTvLoginInfo.visibility= View.VISIBLE
mPayerId = json.getJSONObject("data").getString("player_id")
}
}
override fun loginError(data: Any?) {}
})
}
private fun loginOut(){
GameService.getInstance().loginOut(object:InitZyCallback{
override fun onSuccess(status: String?) {
}
override fun onFailed(o: String?) {
}
})
}
}
\ No newline at end of file
package com.liuxiaotian.myapplication.log;
import android.util.Log;
import com.liuxiaotian.myapplication.BuildConfig;
public class MyLog {
static String className;//类名
static String methodName;//方法名
static int lineNumber;//行数
private MyLog(){
/* Protect from instantiations */
}
public static boolean isDebuggable() {
return BuildConfig.DEBUG;
}
private static String createLog( String log ) {
StringBuffer buffer = new StringBuffer();
buffer.append(methodName);
buffer.append("(").append(className).append(":").append(lineNumber).append(")");
buffer.append(log);
return buffer.toString();
}
private static void getMethodNames(StackTraceElement[] sElements){
className = sElements[1].getFileName();
methodName = sElements[1].getMethodName();
lineNumber = sElements[1].getLineNumber();
}
public static void e(String message){
if (!isDebuggable())
return;
// Throwable instance must be created before any methods
getMethodNames(new Throwable().getStackTrace());
Log.e(className, createLog(message));
}
public static void i(String message){
if (!isDebuggable())
return;
getMethodNames(new Throwable().getStackTrace());
Log.i(className, createLog(message));
}
public static void d(String message){
if (!isDebuggable())
return;
getMethodNames(new Throwable().getStackTrace());
Log.d(className, createLog(message));
}
public static void v(String message){
if (!isDebuggable())
return;
getMethodNames(new Throwable().getStackTrace());
Log.v(className, createLog(message));
}
public static void w(String message){
if (!isDebuggable())
return;
getMethodNames(new Throwable().getStackTrace());
Log.w(className, createLog(message));
}
public static void wtf(String message){
if (!isDebuggable())
return;
getMethodNames(new Throwable().getStackTrace());
Log.wtf(className, createLog(message));
}
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<Button
android:id="@+id/btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="登录注册"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/login_out"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="退出登录"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btn_goole"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="支付"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:textColor="@color/black"
android:text="角色创建类型"
android:layout_marginLeft="10dp"
android:textSize="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_margin="5dp"
android:id="@+id/role_create"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="创角"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:layout_margin="5dp"
android:id="@+id/role_online"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="登录"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:layout_margin="5dp"
android:id="@+id/role_level_up"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="升级"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:layout_margin="5dp"
android:id="@+id/role_offline"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="退出"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:layout_margin="5dp"
android:id="@+id/role_other"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="其他"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>
<TextView
android:textColor="@color/black"
android:id="@+id/tv_login_info"
android:hint="登录信息"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
android:hint="角色信息"
android:textColor="@color/black"
android:id="@+id/tv_role_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.MyApplication" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="blue_grey_500">#607D8B</color>
<color name="blue_grey_600">#546E7A</color>
<color name="blue_grey_700">#455A64</color>
<color name="blue_grey_800">#37474F</color>
<color name="blue_grey_900">#263238</color>
</resources>
\ No newline at end of file
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="g_top_margin">100dp</dimen>
</resources>
<resources>
<string name="app_name">App</string>
<string name="app_id">1086324640822-rhv2dcerpa0ig961pig3lscckaqehjkc.apps.googleusercontent.com</string>
<string name="app_google_id">1086324640822-ghcdp46r3g9f97nh1mghcm2jcbjvilcv.apps.googleusercontent.com</string>
<string name="title_text">Google Sign-In\nQuickstart</string>
<!-- Sign-in status messages -->
<string name="signed_in_fmt">Signed in as: %s</string>
<string name="signed_in">Signed in</string>
<string name="signing_in">Signing in…</string>
<string name="signed_out">Signed out</string>
<string name="signed_in_err">"Error: please check logs."</string>
<string name="error_null_person">
Error: Plus.PeopleApi.getCurrentPerson returned null. Ensure that the Google+ API is
enabled for your project, you have a properly configured google-services.json file
and that your device has an internet connection.
</string>
<string name="loading">Loading…</string>
<string name="auth_code_fmt">Auth Code: %s</string>
<string name="id_token_fmt">ID Token: %s</string>
<!-- Google Play Services error for Toast -->
<string name="play_services_error_fmt">Google Play Services Error: %i</string>
<!-- Button labels -->
<string name="sign_out">Sign Out</string>
<string name="disconnect">Disconnect</string>
<string name="refresh_token">Get Fresh Token</string>
<!-- Content Description for images -->
<string name="desc_google_icon">Google Logo</string>
<!-- Rationale for asking for Contacts -->
<string name="contacts_permission_rationale">Contacts access is needed in order to retrieve your email address.</string>
<!-- Activity Names and Descriptions -->
<string name="name_sign_in_activity">SignInActivity</string>
<string name="desc_sign_in_activity">Signing in, signing out, and revoking access.</string>
<string name="desc_sign_in_activity_scopes">Signing in, signing out, and revoking access with Google Drive permissions.</string>
<string name="name_id_token_activity">IdTokenActivity</string>
<string name="desc_id_token_activity">Retrieving an ID Token for the user.</string>
<string name="desc_auth_code_activity">Demonstrate retrieving an auth code for authorizing your server.</string>
<string name="name_auth_code_activity">ServerAuthCodeActivity</string>
<string name="desc_rest_activity">Demonstrate using Google Sign In with a Google REST API</string>
<string name="name_rest_activity">RestApiActivity</string>
<!-- Messages for the Rest API activity -->
<string name="connections_fmt">Connections: %1$s</string>
<string name="msg_contacts_failed">Get contacts failed.</string>
<!-- TODO(user): replace with your real server client ID -->
<!-- Server Client ID. This should be a valid Web OAuth 2.0 Client ID obtained
from https://console.developers.google.com/ -->
<string name="server_client_id">1086324640822-ghcdp46r3g9f97nh1mghcm2jcbjvilcv.apps.googleusercontent.com</string>
<string name="facebook_app_id">312901538156817</string>
<string name="facebook_client_token">d8f89d3621ea8b5483b96de0f73091bd</string>
</resources>
\ No newline at end of file
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
<!-- Activity with no Title -->
<style name="ThemeOverlay.MyNoTitleActivity" parent="AppTheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<!-- Dark Buttons -->
<style name="ThemeOverlay.MyDarkButton" parent="ThemeOverlay.AppCompat.Dark">
<item name="colorButtonNormal">@color/blue_grey_500</item>
<item name="android:textColor">@android:color/white</item>
</style>
</resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.MyApplication" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
package com.liuxiaotian.myapplication
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.5.31"
repositories {
google()
jcenter() // Warning: this repository is going to shut down soon
maven { url "https://jitpack.io" }
maven { url "https://www.jitpack.io" }
maven {
url 'https://artifact.bytedance.com/repository/ttgamesdk/'
}
maven {
url 'https://artifact.bytedance.com/repository/ttgamesdk_dev/'
}
maven {
url 'https://maven.byted.org/repository/android_public/'
}
maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'http://nexus.zwwlkj01.top/repository/Android/' }
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.bytedance.ttgame:gbsdk_helper:1.0.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter() // Warning: this repository is going to shut down soon
maven { url "https://jitpack.io" }
maven { url "https://www.jitpack.io" }
maven {
url 'https://artifact.bytedance.com/repository/ttgamesdk/'
}
maven {
url 'https://artifact.bytedance.com/repository/ttgamesdk_dev/'
}
maven {
url 'https://maven.byted.org/repository/android_public/'
}
maven { url 'http://nexus.zwwlkj01.top/repository/Android/' }
maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
\ No newline at end of file
-----BEGIN PUBLIC KEY-----
MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAt4MI32exXeSy+iMnJTsc
lWXF/96c4rx3BTV6zp6nDY9NN3Q/mygFiQokIPKQtU/IrKzEe+z24d4GaKPkX4Tw
Z380f0XeiA3EeVLhGY15cCJiGpAbiJ1T/8djwpERAk467EFs3RrwTOeJtJJtbqEH
vAhS3N6OVoaX1YHz/jToQLlhxgfuox0Lac4xTwHLeHYFINWnlbfy2WtK9yqcFlg9
cCQszwq+tYpR+WI/4vhcUNp9sp3M4FYE5vVlpW95PDaxSFB/N5PeJl18YP0hb1aM
TfsWzuvDIinpTOkE1n7kwGaRbDfoUMBeZdEzh2roZhynvQ+4SIg2mhoEhXGaVD5x
k6UwfNSxEUyZqlyPsVSIvYyXR5yk6vyflZk6fau7IuOv3Odc+y9zCS30pK5DB3cC
cq+IM12IAtqW6S/YREkdRE8kTff2BtFs/ApVnJxw63jDW1U/GqJ6yQgkR4g/jYdh
HZgcLFOZvmkkSOmNUc+tzcKAmV2w/4q1zrj9D2/HTYMrAgMBAAE=
-----END PUBLIC KEY-----
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.enableJetifier = true
\ No newline at end of file
#Wed Dec 15 15:21:41 CST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
rootProject.name = "My Application"
include ':app'
# Android SDK 对接文档-v1.0
# Android SDK 对接文档-v1.0
......@@ -176,6 +176,32 @@ implementation 'com.zwwl.legend.sdk:legend:1.0.0'
GameService.getInstance().init(this,"1","")
```
在application中初始化
```
public class MyApp extends Application {
@Override
protected void attachBaseContext(Context base) {
GameApplicationService.getInstance().attachBaseContext(base);
super.attachBaseContext(base);
}
@Override
public void onCreate() {
super.onCreate();
GameApplicationService.getInstance().onCreate(this,1);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
GameApplicationService.getInstance().onConfigurationChanged(this);
}
}
```
### 配置游戏game_id
在主工程AndroidManifest.xml清单文件中配置Meta参数,name值:game_id、value值:即平台游戏ID
......
## ZYouSDK V1.0.0文档接入使用
## ZYouSDK V1.0.0文档接入使用
......@@ -51,7 +51,8 @@
| main_game_id | 主游戏id,由平台方提供 |
| GIDClientID | 谷歌客户端id,由平台方提供 |
| googleScheme | 谷歌iOS 网址架构,由平台方提供 |
|game_secret|游戏签名密钥,服务端对接时会用到,由平台方提供|
| facebookScheme | facebookScheme,由平台方提供 |
| game_secret |游戏签名密钥,服务端对接时会用到,由平台方提供|
> **内购说明**:
支持内购cp方需要提供内购的商品列表
......@@ -97,9 +98,9 @@ fb-messenger-share-api
![example3.png](https://zhangsheng-1300623068.cos.ap-guangzhou.myqcloud.com/example3.png)
&nbsp;&nbsp; 3.9、根据提供的参数在 info.plist 配置 URL types 和 GIDClientID 如图,URL types配置URL Schemes 为googleScheme
&nbsp;&nbsp; 3.9、根据提供的参数在 info.plist 配置 URL types 和 GIDClientID 如图,URL types配置URL Schemes 为googleScheme 和 facebookScheme
![ios_overseas5.png](https://zyapk.zwnet.cn/ios_overseas/ios_overseas5.png)
![ios_overseas6.png](https://zyapk.zwnet.cn/ios_overseas/ios_overseas6.png)
![ios_overseas7.png](https://zyapk.zwnet.cn/ios_overseas/ios_overseas7.png)
### 4、初始化SDK<a name="sec4"></a>
......@@ -144,7 +145,6 @@ app启动时调用注册sdk 在AppDelegate文件中#import "ZYouTool.h"
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data | object | 用户数据 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; player_id | String | 玩家ID |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; avatar | String | 用户头像 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; has_identify | boolean | 是否实名 |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user_token | strng | token |
......
'use strict';var __awaiter=this&&this["\u005f\u005f\u0061\u0077\u0061\u0069\u0074\u0065\u0072"]||function(_0x455867,_0x4de7c3,_0x381494,_0x2e6381){function _0x5e2bd5(_0x1c42e3){return _0x1c42e3 instanceof _0x381494?_0x1c42e3:new _0x381494(function(_0x4fc4bc){_0x4fc4bc(_0x1c42e3);});}return new(_0x381494||(_0x381494=Promise))(function(_0x425e33,_0x8052db){function _0x255ac1(_0xf5f88c){try{_0x4fe3f4(_0x2e6381["\u006e\u0065\u0078\u0074"](_0xf5f88c));}catch(_0x3b52da){_0x8052db(_0x3b52da);}}function _0x5bca2d(_0x1c6139){try{_0x4fe3f4(_0x2e6381["\u0074\u0068\u0072\u006f\u0077"](_0x1c6139));}catch(_0x258a0a){_0x8052db(_0x258a0a);}}function _0x4fe3f4(_0x1537a8){_0x1537a8["\u0064\u006f\u006e\u0065"]?_0x425e33(_0x1537a8["\u0076\u0061\u006c\u0075\u0065"]):_0x5e2bd5(_0x1537a8["\u0076\u0061\u006c\u0075\u0065"])["\u0074\u0068\u0065\u006e"](_0x255ac1,_0x5bca2d);}_0x4fe3f4((_0x2e6381=_0x2e6381["\u0061\u0070\u0070\u006c\u0079"](_0x455867,_0x4de7c3||[]))["\u006e\u0065\u0078\u0074"]());});};var __generator=this&&this["\u005f\u005f\u0067\u0065\u006e\u0065\u0072\u0061\u0074\u006f\u0072"]||function(_0x5b7cf2,_0x42e947){var _0x220696={"\u006c\u0061\u0062\u0065\u006c":0x0,"\u0073\u0065\u006e\u0074":function(){if(_0x2385ec[0x6fd97^0x6fd97]&(0x84be7^0x84be6))throw _0x2385ec[0xc485b^0xc485a];return _0x2385ec[0x2c7dc^0x2c7dd];},"\u0074\u0072\u0079\u0073":[],'ops':[]},_0x1bfe13,_0x9b7667,_0x2385ec,_0x1a3242;return _0x1a3242={"\u006e\u0065\u0078\u0074":_0x3321d2(0x2bc6c^0x2bc6c),'throw':_0x3321d2(0xd72bf^0xd72be),"\u0072\u0065\u0074\u0075\u0072\u006e":_0x3321d2(0xc9ef7^0xc9ef5)},typeof Symbol==="noitcnuf".split("").reverse().join("")&&(_0x1a3242[Symbol['iterator']]=function(){return this;}),_0x1a3242;function _0x3321d2(_0x324fb6){return function(_0x583307){return _0x291ad3([_0x324fb6,_0x583307]);};}function _0x291ad3(_0x1769f8){if(_0x1bfe13)throw new TypeError(".gnitucexe ydaerla si rotareneG".split("").reverse().join(""));while(_0x220696)try{if(_0x1bfe13=0x6548f^0x6548e,_0x9b7667&&(_0x2385ec=_0x1769f8[0x966a2^0x966a2]&(0x8cad1^0x8cad3)?_0x9b7667["\u0072\u0065\u0074\u0075\u0072\u006e"]:_0x1769f8[0x5f636^0x5f636]?_0x9b7667['throw']||((_0x2385ec=_0x9b7667['return'])&&_0x2385ec['call'](_0x9b7667),0xf2d84^0xf2d84):_0x9b7667['next'])&&!(_0x2385ec=_0x2385ec["\u0063\u0061\u006c\u006c"](_0x9b7667,_0x1769f8[0x1]))["\u0064\u006f\u006e\u0065"])return _0x2385ec;if(_0x9b7667=0xc73d6^0xc73d6,_0x2385ec)_0x1769f8=[_0x1769f8[0xd038a^0xd038a]&(0x946c3^0x946c1),_0x2385ec['value']];switch(_0x1769f8[0x0]){case 0x0:case 0x94e7e^0x94e7f:_0x2385ec=_0x1769f8;break;case 0xb9fa4^0xb9fa0:_0x220696["\u006c\u0061\u0062\u0065\u006c"]++;return{'value':_0x1769f8[0x9ee4f^0x9ee4e],'done':![]};case 0x5:_0x220696["\u006c\u0061\u0062\u0065\u006c"]++;_0x9b7667=_0x1769f8[0x1];_0x1769f8=[0x0];continue;case 0x7:_0x1769f8=_0x220696['ops']["\u0070\u006f\u0070"]();_0x220696["\u0074\u0072\u0079\u0073"]["\u0070\u006f\u0070"]();continue;default:if(!(_0x2385ec=_0x220696['trys'],_0x2385ec=_0x2385ec["\u006c\u0065\u006e\u0067\u0074\u0068"]>0x0&&_0x2385ec[_0x2385ec['length']-(0xed8be^0xed8bf)])&&(_0x1769f8[0x0]===(0xe1299^0xe129f)||_0x1769f8[0x0]===0x2)){_0x220696=0x0;continue;}if(_0x1769f8[0x0]===(0xdbe33^0xdbe30)&&(!_0x2385ec||_0x1769f8[0x1]>_0x2385ec[0x37585^0x37585]&&_0x1769f8[0x1]<_0x2385ec[0x7b1cc^0x7b1cf])){_0x220696["\u006c\u0061\u0062\u0065\u006c"]=_0x1769f8[0x1];break;}if(_0x1769f8[0x0]===(0xb1674^0xb1672)&&_0x220696["\u006c\u0061\u0062\u0065\u006c"]<_0x2385ec[0x1]){_0x220696['label']=_0x2385ec[0x7c3b0^0x7c3b1];_0x2385ec=_0x1769f8;break;}if(_0x2385ec&&_0x220696['label']<_0x2385ec[0x2]){_0x220696['label']=_0x2385ec[0x97247^0x97245];_0x220696["\u006f\u0070\u0073"]["\u0070\u0075\u0073\u0068"](_0x1769f8);break;}if(_0x2385ec[0x7bf4f^0x7bf4d])_0x220696['ops']["\u0070\u006f\u0070"]();_0x220696["\u0074\u0072\u0079\u0073"]["\u0070\u006f\u0070"]();continue;}_0x1769f8=_0x42e947['call'](_0x5b7cf2,_0x220696);}catch(_0x3919e1){_0x1769f8=[0x6,_0x3919e1];_0x9b7667=0x0;}finally{_0x1bfe13=_0x2385ec=0xdd7e6^0xdd7e6;}if(_0x1769f8[0x0]&0x5)throw _0x1769f8[0x1];return{'value':_0x1769f8[0x0]?_0x1769f8[0x1]:void 0x0,"\u0064\u006f\u006e\u0065":!![]};}};exports['__esModule']=!![];var zwsdk=function(){function _0xfcdd9a(){this['VERSION']=_0xfcdd9a['SDKVersion'];var _0x2eeb9e=arguments['length']>(0xcba75^0xcba75)&&void(0x9e2d6^0x9e2d6)!==arguments[0x0]?arguments[0x5c802^0x5c802]:null;_0xfcdd9a["\u0056\u0045\u0052\u0053\u0049\u004f\u004e"]=this['VERSION'];var _0x30d73e=wx["\u0067\u0065\u0074\u0045\u006e\u0074\u0065\u0072\u004f\u0070\u0074\u0069\u006f\u006e\u0073\u0053\u0079\u006e\u0063"]()['query'];if(_0x2eeb9e){_0xfcdd9a['default']["\u0061\u0070\u0070\u0049\u0064"]=_0x2eeb9e['app_id'];_0xfcdd9a["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]["\u0067\u0061\u006d\u0065\u0049\u0064"]=_0x2eeb9e['game_id'];_0xfcdd9a["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]["\u006f\u0073"]=_0xfcdd9a["\u0067\u0065\u0074\u0053\u0079\u0073\u0074\u0065\u006d\u004f\u0053"]();_0xfcdd9a['default']['baseUrl']=_0x2eeb9e['dev']?"ipa/pot.30jklwwz.sz//:sptth".split("").reverse().join(""):'https://zyou.wozhangwan.com/api';_0xfcdd9a["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]["\u0071\u0075\u0065\u0072\u0079"]=_0x30d73e;_0xfcdd9a['default']["\u0073\u0074\u0061\u0074\u0065"]=_0xfcdd9a['getState'](_0x30d73e);var _0x412b48=wx["\u0067\u0065\u0074\u0053\u0079\u0073\u0074\u0065\u006d\u0049\u006e\u0066\u006f\u0053\u0079\u006e\u0063"]()["\u0053\u0044\u004b\u0056\u0065\u0072\u0073\u0069\u006f\u006e"];console["\u006c\u006f\u0067"](":noisrev bil".split("").reverse().join("")+_0x412b48);if(_0xfcdd9a['selfCompareVersion'](_0x412b48,"\u0031\u002e\u0034\u002e\u0030")>=0x0){wx["\u0073\u0065\u0074\u004b\u0065\u0065\u0070\u0053\u0063\u0072\u0065\u0065\u006e\u004f\u006e"]({'keepScreenOn':!![]});console["\u006c\u006f\u0067"]("\u5C4F\u606F\u4E0D\u7F6E\u8BBE".split("").reverse().join(""));}else{}}}_0xfcdd9a["\u0073\u0065\u006c\u0066\u0043\u006f\u006d\u0070\u0061\u0072\u0065\u0056\u0065\u0072\u0073\u0069\u006f\u006e"]=function(_0x2413c0,_0x2ce16d){_0x2413c0=_0x2413c0['split']("\u002e");_0x2ce16d=_0x2ce16d['split']('.');var _0x558380=Math["\u006d\u0061\u0078"](_0x2413c0["\u006c\u0065\u006e\u0067\u0074\u0068"],_0x2ce16d["\u006c\u0065\u006e\u0067\u0074\u0068"]);while(_0x2413c0["\u006c\u0065\u006e\u0067\u0074\u0068"]<_0x558380){_0x2413c0['push']("\u0030");}while(_0x2ce16d["\u006c\u0065\u006e\u0067\u0074\u0068"]<_0x558380){_0x2ce16d['push']("\u0030");}for(var _0x4e6086=0x0;_0x4e6086<_0x558380;_0x4e6086++){var _0x75804b=parseInt(_0x2413c0[_0x4e6086]);var _0x1672f3=parseInt(_0x2ce16d[_0x4e6086]);if(_0x75804b>_0x1672f3){return 0x1;}else if(_0x75804b<_0x1672f3){return-(0x5eeaa^0x5eeab);}}return 0x0;};_0xfcdd9a["\u0070\u0072\u006f\u0074\u006f\u0074\u0079\u0070\u0065"]['getGameConf']=function(){return new Promise(function(_0x35aefe,_0x1895ff){_0xfcdd9a["\u0061\u006a\u0061\u0078"]("\u002f\u006d\u0069\u006e\u0069\u005f\u0073\u0064\u006b\u002f\u0067\u0061\u006d\u0065\u002f\u0067\u0065\u0074\u0043\u006f\u006e\u0066",{'app_id':_0xfcdd9a['default']['appId'],'game_id':_0xfcdd9a["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]["\u0067\u0061\u006d\u0065\u0049\u0064"],'app_version':'1.1'})['then'](function(_0x5cc449){if(_0x5cc449["\u0073\u0074\u0061\u0074\u0075\u0073\u005f\u0063\u006f\u0064\u0065"]===0x1){_0xfcdd9a['default']['gameConfig']=_0x5cc449['data']['data'];_0xfcdd9a['default']['gameConfig']["\u0067\u0061\u006d\u0065\u005f\u0063\u006c\u0075\u0062"]&&_0xfcdd9a["\u0067\u0061\u006d\u0065\u0043\u006c\u0075\u0062\u0049\u006e\u0069\u0074"]();}_0x35aefe(_0x5cc449);});});};_0xfcdd9a['prototype']["\u006c\u006f\u0067\u0069\u006e"]=function(){var _0x4eae49=arguments['length']>0x0&&void(0xb56a2^0xb56a2)!==arguments[0x0]?arguments[0x0]:{};return new Promise(function(_0x58fd57,_0x5b1d57){wx["\u006c\u006f\u0067\u0069\u006e"]({'success':function(_0x1ca464){var _0x2788f2=_0x1ca464['code'];_0xfcdd9a['ajax']('/mini_sdk/auth/login',{'code':_0x2788f2,'state':_0xfcdd9a['default']['state'],"\u0071\u0075\u0065\u0072\u0079":_0xfcdd9a['default']['query'],'app_id':_0xfcdd9a['default']['appId'],"\u0067\u0061\u006d\u0065\u005f\u0069\u0064":_0xfcdd9a['default']['gameId'],'os':_0xfcdd9a['default']['os'],'device_number':_0xfcdd9a['default']['device_brand'],"\u0064\u0065\u0076\u0069\u0063\u0065\u005f\u0062\u0072\u0061\u006e\u0064":_0xfcdd9a["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['device_brand']})["\u0074\u0068\u0065\u006e"](function(_0x5e7e58){var _0x4c9d9d=_0x5e7e58;if(_0x5e7e58['status_code']===0x1){_0xfcdd9a['default']['userToken']=_0x5e7e58['data']["\u0064\u0061\u0074\u0061"]['user_token'];_0xfcdd9a['default']['memberId']=_0x5e7e58['data']['data']['member_id'];_0xfcdd9a['initShare']();_0xfcdd9a['checkLoginStatus']();_0xfcdd9a['initSubscribeMessage']();_0xfcdd9a['subscribeMessageScheduled']();_0x58fd57(_0x4c9d9d);}else{wx['showModal']({'title':'异常','content':_0x5e7e58['msg'],'confirmText':'我知道了','showCancel':![]});}});}});});};_0xfcdd9a['prototype']['updateUserInfo']=function(){var _0x45fc8c=arguments['length']>0x0&&void 0x0!==arguments[0x792fd^0x792fd]?arguments[0x7b9e1^0x7b9e1]:{};return new Promise(function(_0x4c9a43,_0x20e8b2){_0xfcdd9a['ajax']("ofnIetadpu/rebmem/kds_inim/".split("").reverse().join(""),{'app_id':_0xfcdd9a['default']['appId'],'game_id':_0xfcdd9a['default']['gameId'],'member_id':_0xfcdd9a["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['memberId'],"\u0072\u0061\u0077\u005f\u0064\u0061\u0074\u0061":_0x45fc8c['raw_data']||"",'signature':_0x45fc8c['signature']||'','encrypted_data':_0x45fc8c["\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0065\u0064\u005f\u0064\u0061\u0074\u0061"]||"".split("").reverse().join(""),"\u0069\u0076":_0x45fc8c['iv']||"".split("").reverse().join(""),'user_info':_0x45fc8c['user_info']||"".split("").reverse().join("")})['then'](function(_0xbc7d3f){_0xfcdd9a["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['roleId']=_0xbc7d3f["\u0064\u0061\u0074\u0061"]['data']['role_id']||'';_0x4c9a43(_0xbc7d3f);});});};_0xfcdd9a['prototype']['createOrder']=function(){var _0x2f6bf4=this;var _0x55a7b8=arguments['length']>(0xe9f85^0xe9f85)&&void 0x0!==arguments[0x0]?arguments[0x0]:{};return new Promise(function(_0xc190cc,_0x1eed17){return __awaiter(_0x2f6bf4,void 0x0,void 0x0,function(){var _0x583f64,_0x4611bd,_0x548903,_0x452943,_0x35ca4d,_0x397899,_0x873132,_0x5adbec,_0x32875b,_0x505447;var _0x5a0692=this;return __generator(this,function(_0x105db9){switch(_0x105db9["\u006c\u0061\u0062\u0065\u006c"]){case 0x1af1d^0x1af1d:return[0x4,_0xfcdd9a['ajax']('/mini_sdk/order/create',{'app_id':_0xfcdd9a['default']['appId'],'game_id':_0xfcdd9a['default']["\u0067\u0061\u006d\u0065\u0049\u0064"],'member_id':_0xfcdd9a['default']['memberId'],'os':_0xfcdd9a['default']['os'],'device_number':_0xfcdd9a['default']["\u0064\u0065\u0076\u0069\u0063\u0065\u005f\u006e\u0075\u006d\u0062\u0065\u0072"],'device_brand':_0xfcdd9a['default']['device_brand'],'order':_0x55a7b8['order']||{},'role':_0x55a7b8['role']||{},"\u0072\u006f\u006c\u0065\u005f\u0069\u0064":_0xfcdd9a['default']['roleId']})];case 0x1:_0x583f64=_0x105db9['sent']();if(_0x583f64['status_code']===0x1){_0xc190cc({'status_code':_0x583f64['status_code'],'msg':_0x583f64['msg'],'data':{'data':{'order_id':_0x583f64['data']['data']['order_id']}}});_0x4611bd=_0x583f64['data']['data']['pay_type'];if(_0x4611bd==='customer'){wx["\u0073\u0068\u006f\u0077\u004d\u006f\u0064\u0061\u006c"]({'title':'充值教程','content':'即将跳转官方【客服会话】充值,给客服回复“1”获取充值链接','confirmText':'客服充值','showCancel':![],'success':function(_0x17a834){if(_0x17a834['confirm']){console['log']('res');_0x5a0692["\u0063\u0075\u0073\u0074\u006f\u006d\u004d\u0065\u0073\u0073\u0061\u0067\u0065"]();}}});}if(_0x4611bd==="yapinim".split("").reverse().join("")){wx['navigateToMiniProgram']({'appId':_0x583f64['data']['data']['mini_pay']['app_id'],"\u0070\u0061\u0074\u0068":_0x583f64['data']["\u0064\u0061\u0074\u0061"]["\u006d\u0069\u006e\u0069\u005f\u0070\u0061\u0079"]['path']});}if(_0x4611bd==="yapm".split("").reverse().join("")){_0x548903=_0x583f64['data']["\u0064\u0061\u0074\u0061"]['mpay'],_0x452943=_0x548903['mode'],_0x35ca4d=_0x548903['env'],_0x397899=_0x548903['offer_id'],_0x873132=_0x548903['currency_type'],_0x5adbec=_0x548903['platform'],_0x32875b=_0x548903['buy_quantity'],_0x505447=_0x548903['zone_id'];wx['requestMidasPayment']({'mode':_0x452943,"\u0065\u006e\u0076":_0x35ca4d,"\u006f\u0066\u0066\u0065\u0072\u0049\u0064":_0x397899,'currencyType':_0x873132,'buyQuantity':_0x32875b,"\u0070\u006c\u0061\u0074\u0066\u006f\u0072\u006d":_0x5adbec,'zoneId':_0x505447,"\u006f\u0075\u0074\u0054\u0072\u0061\u0064\u0065\u004e\u006f":_0x583f64["\u0064\u0061\u0074\u0061"]["\u0064\u0061\u0074\u0061"]['order_id'],'complete':function(_0x491f1e){_0xfcdd9a['ajax']('/mini_sdk/mds_pay/callback',{"\u006f\u0072\u0064\u0065\u0072\u005f\u0069\u0064":_0x583f64['data']['data']['order_id']||"".split("").reverse().join(""),'status':_0x491f1e["\u0065\u0072\u0072\u0043\u006f\u0064\u0065"]?![]:!![],'code':_0x491f1e['errCode'],'msg':_0x491f1e['errMsg']})['then'](function(_0x51ff98){console['log'](":yap/yap_sdm/kds_inim/".split("").reverse().join(""),_0x51ff98);});}});}}else{_0xc190cc(_0x583f64);}return[0x2];}});});});};_0xfcdd9a['prototype']['checkOrder']=function(){var _0x51b313=arguments['length']>(0xecf44^0xecf44)&&void(0x26dce^0x26dce)!==arguments[0x2fb77^0x2fb77]?arguments[0x0]:{};return new Promise(function(_0x12ec4a,_0x288ff5){_0xfcdd9a['ajax']('/mini_sdk/order/getPayStatus',{'order':_0x51b313['order']})['then'](function(_0x29d5e4){_0x12ec4a(_0x29d5e4);});});};_0xfcdd9a['checkLoginStatus']=function(){_0xfcdd9a["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['checkLoginStatusTimer']=setTimeout(function(){_0xfcdd9a['ajax']('/mini_sdk/member/checkLoginStatus',{})['then'](function(_0x18eef6){if(_0x18eef6['status_code']&&_0x18eef6['status_code']===-0x1){wx['showLoading']({'title':"\u8bf7\u91cd\u65b0\u767b\u5f55\u0021",'mask':!![],"\u0063\u006f\u006d\u0070\u006c\u0065\u0074\u0065":function(_0x4e681f){console['log']('showLoading,complete',_0x4e681f);}});wx['closeSocket']();wx['onSocketOpen'](function(_0x227b24){wx['closeSocket']();});clearInterval(_0xfcdd9a['default']['checkLoginStatusTimer']);}else{_0xfcdd9a["\u0063\u0068\u0065\u0063\u006b\u004c\u006f\u0067\u0069\u006e\u0053\u0074\u0061\u0074\u0075\u0073"]();}})['catch'](function(_0x1f846e){_0xfcdd9a['checkLoginStatus']();});},0xea60);};_0xfcdd9a["\u0069\u006e\u0069\u0074\u0053\u0068\u0061\u0072\u0065"]=function(){_0xfcdd9a['ajax']('/mini_sdk/share/getShareInfo',{'game_id':_0xfcdd9a['default']['gameId'],"\u006d\u0065\u006d\u0062\u0065\u0072\u005f\u0069\u0064":_0xfcdd9a['default']['memberId'],'app_id':_0xfcdd9a['default']["\u0061\u0070\u0070\u0049\u0064"]})['then'](function(_0x2c96b9){if(_0x2c96b9['status_code']&&_0x2c96b9['status_code']===(0xafea9^0xafea8)){wx["\u006f\u006e\u0053\u0068\u0061\u0072\u0065\u0041\u0070\u0070\u004d\u0065\u0073\u0073\u0061\u0067\u0065"](function(){_0xfcdd9a["\u006c\u006f\u0067"]('系统转发:onShareAppMessage',{'params':{'game_id':_0xfcdd9a['default']['gameId'],'member_id':_0xfcdd9a['default']['memberId'],'app_id':_0xfcdd9a['default']['appId']},"\u0072\u0065\u0073\u0075\u006c\u0074":_0x2c96b9});_0xfcdd9a['reportShare']({'share_id':_0x2c96b9['data']['data']['share_id']});return{'title':_0x2c96b9['data']['data']['title'],'imageUrl':_0x2c96b9['data']['data']['share_img'],'query':'state='+_0x2c96b9['data']['data']['state']};});wx['showShareMenu']({'withShareTicket':!![],'menus':['shareAppMessage',"enilemiTerahs".split("").reverse().join("")]});}});};_0xfcdd9a['prototype']["\u0067\u0065\u0074\u0053\u0068\u0061\u0072\u0065\u0049\u006e\u0066\u006f"]=function(){var _0x569d0d=arguments['length']>(0x8bb52^0x8bb52)&&void(0x45891^0x45891)!==arguments[0x72f3d^0x72f3d]?arguments[0x6e36f^0x6e36f]:{};_0xfcdd9a['ajax']('/mini_sdk/share/getShareInfo',{'game_id':_0xfcdd9a['default']['gameId'],'member_id':_0xfcdd9a['default']['memberId'],'app_id':_0xfcdd9a['default']['appId'],'path':_0x569d0d['path']||"".split("").reverse().join("")})['then'](function(_0xcf72ed){if(_0xcf72ed['status_code']&&_0xcf72ed['status_code']===0x1){wx['onShareAppMessage'](function(){_0xfcdd9a['log']('系统转发:onShareAppMessage',{'params':{'game_id':_0xfcdd9a["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['gameId'],'member_id':_0xfcdd9a['default']["\u006d\u0065\u006d\u0062\u0065\u0072\u0049\u0064"],"\u0061\u0070\u0070\u005f\u0069\u0064":_0xfcdd9a['default']['appId'],'path':_0x569d0d["\u0070\u0061\u0074\u0068"]||"".split("").reverse().join("")},'result':_0xcf72ed});_0xfcdd9a['reportShare']({'share_id':_0xcf72ed['data']["\u0064\u0061\u0074\u0061"]["\u0073\u0068\u0061\u0072\u0065\u005f\u0069\u0064"]});return{'title':_0xcf72ed['data']["\u0064\u0061\u0074\u0061"]["\u0074\u0069\u0074\u006c\u0065"],'imageUrl':_0xcf72ed['data']['data']['share_img'],'query':'state='+_0xcf72ed['data']['data']['state']};});wx['showShareMenu']({'withShareTicket':!![],'menus':['shareAppMessage',"enilemiTerahs".split("").reverse().join("")]});if(_0x569d0d["\u0073\u0068\u0061\u0072\u0065\u0041\u0070\u0070\u004d\u0065\u0073\u0073\u0061\u0067\u0065"]||_0x569d0d["\u0073\u0068\u0061\u0072\u0065\u0041\u0070\u0070\u004d\u0065\u0073\u0073\u0061\u0067\u0065"]===undefined){wx['shareAppMessage']({'title':_0xcf72ed['data']['data']['title'],'imageUrl':_0xcf72ed['data']['data']['share_img'],'query':"\u0073\u0074\u0061\u0074\u0065\u003d"+_0xcf72ed['data']['data']['state']});_0xfcdd9a['reportShare']({'share_id':_0xcf72ed["\u0064\u0061\u0074\u0061"]['data']['share_id']});_0xfcdd9a['log']("\u4e3b\u52a8\u8f6c\u53d1\u003a\u0073\u0068\u0061\u0072\u0065\u0041\u0070\u0070\u004d\u0065\u0073\u0073\u0061\u0067\u0065",{'share_id':_0xcf72ed['data']['data']['share_id']});}}});};_0xfcdd9a['reportShare']=function(){var _0xc2a945=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x7f8a1^0x7f8a1]:{};_0xfcdd9a['ajax']("troper/erahs/kds_inim/".split("").reverse().join(""),{'game_id':_0xfcdd9a["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['gameId'],'member_id':_0xfcdd9a['default']['memberId'],'app_id':_0xfcdd9a["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['appId'],'share_id':_0xc2a945['share_id']||'','ext':_0xc2a945['ext']||"".split("").reverse().join("")})['then'](function(_0x4cbe60){console['log'](_0x4cbe60);});};_0xfcdd9a["\u0070\u0072\u006f\u0074\u006f\u0074\u0079\u0070\u0065"]['updateRole']=function(){var _0x33f747=arguments['length']>0x0&&void(0xa16b5^0xa16b5)!==arguments[0x5438e^0x5438e]?arguments[0x0]:{};return new Promise(function(_0x4a2a04,_0x3c78b1){_0xfcdd9a['ajax']("troper/elor/kds_inim/".split("").reverse().join(""),{'app_id':_0xfcdd9a['default']['appId'],'game_id':_0xfcdd9a['default']['gameId'],'member_id':_0xfcdd9a['default']['memberId'],'os':_0xfcdd9a['default']['os'],"\u0064\u0065\u0076\u0069\u0063\u0065\u005f\u006e\u0075\u006d\u0062\u0065\u0072":_0xfcdd9a['default']['device_number'],'device_brand':_0xfcdd9a['default']['device_brand'],'role':_0x33f747['role']||{}})['then'](function(_0x30058a){_0x4a2a04(_0x30058a);});});};_0xfcdd9a['prototype']['checkMsg']=function(){var _0x2f5cf2=arguments['length']>(0xe448f^0xe448f)&&void 0x0!==arguments[0x0]?arguments[0x920e3^0x920e3]:{};return new Promise(function(_0xe97a1e,_0x57e6e7){_0xfcdd9a['ajax']("egassem/kcehc/kds_inim/".split("").reverse().join(""),{'game_id':_0xfcdd9a['default']['gameId'],'member_id':_0xfcdd9a['default']['memberId'],'app_id':_0xfcdd9a['default']['appId'],'content':_0x2f5cf2['content']||''})['then'](function(_0x5bf5e9){_0xe97a1e(_0x5bf5e9);});});};_0xfcdd9a['prototype']['checkImg']=function(){var _0x111e25=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};return new Promise(function(_0x5ec231,_0x56ab32){wx['uploadFile']({'url':_0xfcdd9a['default']['baseUrl']+"egami/kcehc/kds_inim/".split("").reverse().join(""),'filePath':_0x111e25['filePath'],'name':'image','header':{'User-Token':_0xfcdd9a['default']['userToken']},'formData':{'game_id':_0xfcdd9a['default']['gameId'],'member_id':_0xfcdd9a['default']['memberId'],'app_id':_0xfcdd9a['default']['appId'],'user_token':_0xfcdd9a['default']['userToken']},'success':function(_0x5723d4){_0x5ec231(_0x5723d4);}});});};_0xfcdd9a['prototype']['customMessage']=function(){_0xfcdd9a['ajax']('/mini_sdk/custom_message/config',{'game_id':_0xfcdd9a['default']['gameId']})['then'](function(_0x3fa3a7){if(_0x3fa3a7['status_code']===(0x8aa79^0x8aa78)){wx['openCustomerServiceConversation']({'sessionFrom':_0x3fa3a7['data']['data']["\u0073\u0065\u0073\u0073\u0069\u006f\u006e\u005f\u0066\u0072\u006f\u006d"],'showMessageCard':_0x3fa3a7['data']['data']['show_message_card'],'sendMessageTitle':_0x3fa3a7['data']['data']['send_message_title'],'sendMessagePath':_0x3fa3a7['data']['data']['send_message_path'],'sendMessageImg':_0x3fa3a7['data']['data']['send_message_img'],'complete':function(_0x28b93d){_0xfcdd9a['log']('客服会话:openCustomerServiceConversation',_0x28b93d);}});}});};_0xfcdd9a['prototype']['sendCaptcha']=function(){var _0x519c73=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x481aa^0x481aa]:{};return new Promise(function(_0x1b419e,_0x3e70b1){_0xfcdd9a['ajax']('/mini_sdk/captcha/send',{'mobile':_0x519c73['mobile']||''})['then'](function(_0x39bd34){_0x1b419e(_0x39bd34);});});};_0xfcdd9a['prototype']['bindMobile']=function(){var _0x49d6f4=arguments['length']>0x0&&void(0xe141b^0xe141b)!==arguments[0x0]?arguments[0x0]:{};return new Promise(function(_0x331b3c,_0x24c551){_0xfcdd9a['ajax']('/mini_sdk/member/bindMobile',{'member_id':_0xfcdd9a['default']['memberId'],'mobile':_0x49d6f4['mobile']||"".split("").reverse().join(""),'code':_0x49d6f4['code']||'','key':_0x49d6f4['key']||''})['then'](function(_0x2ffd62){_0x331b3c(_0x2ffd62);});});};_0xfcdd9a['prototype']['subscribeMessage']=function(){return __awaiter(this,void 0x0,void 0x0,function(){return __generator(this,function(_0x1c0911){wx['requestSubscribeMessage']({'tmplIds':_0xfcdd9a['default']['subscribeMessageList']||[],'fail':function(_0x3d75f6){console['log']('requestSubscribeMessage\x20fail:',_0x3d75f6);},'success':function(_0x276d31){console['log']('requestSubscribeMessage\x20success:',_0x276d31);}});return[0x2];});});};_0xfcdd9a['initSubscribeMessage']=function(){_0xfcdd9a['ajax']('/mini_sdk/mini_task/taskTemplateList',{'game_id':_0xfcdd9a['default']['gameId']})['then'](function(_0x1a9cab){if(_0x1a9cab['status_code']===0x1){_0xfcdd9a['default']['subscribeMessageList']=_0x1a9cab['data']['data']||[];if(_0xfcdd9a['default']['subscribeMessageTimer']){clearInterval(_0xfcdd9a['default']['subscribeMessageTimer']);_0xfcdd9a['subscribeMessageScheduled']();}}});};_0xfcdd9a['subscribeMessageScheduled']=function(){_0xfcdd9a['default']['subscribeMessageTimer']=setTimeout(function(){_0xfcdd9a['initSubscribeMessage']();},0x36ee80);};_0xfcdd9a['ajax']=function(_0x1567ed,_0x5cf124){var _0x47f81c={'content-type':'application/json'};if(_0xfcdd9a['default']['userToken']){_0x47f81c['User-Token']=_0xfcdd9a['default']['userToken'];}_0x47f81c['Sdk-Version']=_0xfcdd9a['SDKVersion'];var _0x19eb8f=_0x5cf124['showLoading'],_0x5dd138=_0x5cf124['loadingParams'],_0x40711f=_0x5cf124['showToast'],_0x28bf48=_0x5cf124['toastParams'];_0x19eb8f&&wx['showLoading'](_0x5dd138);return new Promise(function(_0x448ae2,_0x3111a4){wx['request']({'method':"\u0050\u004f\u0053\u0054",'url':_0xfcdd9a['default']['baseUrl']+_0x1567ed,'data':_0x5cf124,'header':_0x47f81c,'success':function(_0x57f2c7){if(_0x57f2c7['data']['status_code']===-(0xa9427^0xa9426)){wx['showLoading']({'title':'请重新登录!','mask':!![],'complete':function(_0x4d452e){console['log']('showLoading,complete',_0x4d452e);}});wx['closeSocket']({'complete':function(_0x37c752){console['log']('closeSocket,complete',_0x37c752);}});wx['onSocketOpen'](function(_0x45fd64){wx['closeSocket']();});console['log'](")(daoler.noitacol".split("").reverse().join(""));location['reload']();}_0x19eb8f&&wx['hideLoading']();if(_0x40711f){_0x28bf48['title']=_0x57f2c7['data']['msg'];wx['showToast'](_0x28bf48);}_0x448ae2(_0x57f2c7['data']);},'fail':function(_0x1a474e){_0x19eb8f&&wx['hideLoading']();if(_0x40711f){_0x28bf48['title']=_0x1a474e['errMsg'];wx['showToast'](_0x28bf48);}_0x448ae2(_0x1a474e);}});});};_0xfcdd9a['getSystemOS']=function(){var _0x4b9742=wx['getSystemInfoSync']()['system'];if(_0x4b9742['toLocaleLowerCase']()['indexOf']('android')>-(0xabf40^0xabf41))return'android';if(_0x4b9742['toLocaleLowerCase']()['indexOf']("soi".split("").reverse().join(""))>-(0x302c6^0x302c7))return'ios';if(_0x4b9742['toLocaleLowerCase']()['indexOf']('windows')>-0x1)return"swodniw".split("").reverse().join("");if(_0x4b9742['toLocaleLowerCase']()['indexOf']("socam".split("").reverse().join(""))>-0x1)return"socam".split("").reverse().join("");return"rehto".split("").reverse().join("");};_0xfcdd9a['getSystemBrand']=function(){var _0x4f2757=wx['getSystemInfoSync']()['brand'];return _0x4f2757;};_0xfcdd9a['getSystemNumber']=function(){var _0x4e0806=wx['getSystemInfoSync']()['model'];return _0x4e0806;};_0xfcdd9a['midasPay']=function(_0x3449fe){return wx['requestMidasPayment'](_0x3449fe);};_0xfcdd9a['getQueryVariable']=function(_0x5dcaaf,_0x55316e){var _0x441619=_0x5dcaaf;var _0x3e08e3=_0x441619['split']('&');for(var _0x253f32=0x40c16^0x40c16;_0x253f32<_0x3e08e3['length'];_0x253f32++){var _0x5239e6=_0x3e08e3[_0x253f32]['split']('=');if(_0x5239e6[0x93053^0x93053]===_0x55316e){return _0x5239e6[0x1];}}return'';};_0xfcdd9a['getState']=function(_0x75cf79){if(_0x75cf79['state']){return _0x75cf79['state'];}if(_0x75cf79['scene']&&_0x75cf79['scene']['indexOf']('state')>-(0x9b542^0x9b543)){return _0xfcdd9a['getQueryVariable'](decodeURIComponent(_0x75cf79['scene']),'state');}return'';};_0xfcdd9a['log']=function(_0xeec396,_0x22369b){_0xfcdd9a['ajax']('/mini_sdk/sdk_log/miniLog',{'name':_0xeec396,'value':_0x22369b})['then'](function(_0x27634b){console['log']('log:',_0x27634b);});};_0xfcdd9a['gameClubInit']=function(){_0xfcdd9a['default']['gameClubButton']=wx['createGameClubButton']({'style':{'left':0x0,'top':0x0,'width':0x0,'height':0x0}});};_0xfcdd9a['prototype']['gameClubShow']=function(){_0xfcdd9a['default']['gameClubButton']&&_0xfcdd9a['default']['gameClubButton']['show']();};_0xfcdd9a['prototype']['gameClubHide']=function(){_0xfcdd9a['default']['gameClubButton']&&_0xfcdd9a['default']['gameClubButton']['hide']();};_0xfcdd9a['prototype']['gameClubSetStyle']=function(_0x28a17a){if(!_0xfcdd9a['default']['gameClubButton'])return;_0xfcdd9a['default']['gameClubButton']['style']=Object['assign'](_0xfcdd9a['default']['gameClubButton']['style'],_0x28a17a);};_0xfcdd9a['SDKVersion']='1.7.1';_0xfcdd9a['default']={'checkLoginStatusTimer':null,'gameConfig':{},'appId':'','gameId':'','os':_0xfcdd9a['getSystemOS'](),'device_number':_0xfcdd9a['getSystemNumber'](),'device_brand':_0xfcdd9a['getSystemBrand'](),'memberId':'','roleId':'','playerId':'','userToken':'','baseUrl':'','subscribeMessageList':[],'subscribeMessageTimer':null,'gameClubButton':null};return _0xfcdd9a;}();exports['default']=zwsdk;
\ No newline at end of file
'use strict';var __awaiter=this&&this["\u005f\u005f\u0061\u0077\u0061\u0069\u0074\u0065\u0072"]||function(_0x57599b,_0x17ed6e,_0x55b9a4,_0x591f5e){function _0x476c27(_0x46809a){return _0x46809a instanceof _0x55b9a4?_0x46809a:new _0x55b9a4(function(_0x5595a1){_0x5595a1(_0x46809a);});}return new(_0x55b9a4||(_0x55b9a4=Promise))(function(_0x26b0d2,_0x3ed0ee){function _0x41aba9(_0x296980){try{_0xd69a4f(_0x591f5e["\u006e\u0065\u0078\u0074"](_0x296980));}catch(_0x2b5dff){_0x3ed0ee(_0x2b5dff);}}function _0x266223(_0x1ed79f){try{_0xd69a4f(_0x591f5e["\u0074\u0068\u0072\u006f\u0077"](_0x1ed79f));}catch(_0x3d9d4c){_0x3ed0ee(_0x3d9d4c);}}function _0xd69a4f(_0x2b3e0d){_0x2b3e0d["\u0064\u006f\u006e\u0065"]?_0x26b0d2(_0x2b3e0d["\u0076\u0061\u006c\u0075\u0065"]):_0x476c27(_0x2b3e0d["\u0076\u0061\u006c\u0075\u0065"])["\u0074\u0068\u0065\u006e"](_0x41aba9,_0x266223);}_0xd69a4f((_0x591f5e=_0x591f5e["\u0061\u0070\u0070\u006c\u0079"](_0x57599b,_0x17ed6e||[]))["\u006e\u0065\u0078\u0074"]());});};var __generator=this&&this["\u005f\u005f\u0067\u0065\u006e\u0065\u0072\u0061\u0074\u006f\u0072"]||function(_0x2fbdd6,_0x350a6e){var _0x53e67d={'label':0x0,"\u0073\u0065\u006e\u0074":function(){if(_0x35f72f[0x4a286^0x4a286]&(0x29b9a^0x29b9b))throw _0x35f72f[0xcc5fc^0xcc5fd];return _0x35f72f[0x3ed25^0x3ed24];},'trys':[],"\u006f\u0070\u0073":[]},_0x3d6e40,_0x2ddfdb,_0x35f72f,_0x2094fd;return _0x2094fd={"\u006e\u0065\u0078\u0074":_0x1a37b7(0xb4ffd^0xb4ffd),'throw':_0x1a37b7(0xd009e^0xd009f),'return':_0x1a37b7(0x2100b^0x21009)},typeof Symbol==="noitcnuf".split("").reverse().join("")&&(_0x2094fd[Symbol['iterator']]=function(){return this;}),_0x2094fd;function _0x1a37b7(_0x348c5a){return function(_0x4f697a){return _0x8cea37([_0x348c5a,_0x4f697a]);};}function _0x8cea37(_0x2bc3db){if(_0x3d6e40)throw new TypeError(".gnitucexe ydaerla si rotareneG".split("").reverse().join(""));while(_0x53e67d)try{if(_0x3d6e40=0x96b35^0x96b34,_0x2ddfdb&&(_0x35f72f=_0x2bc3db[0x9b040^0x9b040]&(0x63533^0x63531)?_0x2ddfdb["\u0072\u0065\u0074\u0075\u0072\u006e"]:_0x2bc3db[0x0]?_0x2ddfdb['throw']||((_0x35f72f=_0x2ddfdb['return'])&&_0x35f72f["\u0063\u0061\u006c\u006c"](_0x2ddfdb),0x0):_0x2ddfdb["\u006e\u0065\u0078\u0074"])&&!(_0x35f72f=_0x35f72f['call'](_0x2ddfdb,_0x2bc3db[0x1]))['done'])return _0x35f72f;if(_0x2ddfdb=0x0,_0x35f72f)_0x2bc3db=[_0x2bc3db[0x0]&0x2,_0x35f72f['value']];switch(_0x2bc3db[0x0]){case 0x0:case 0x1:_0x35f72f=_0x2bc3db;break;case 0xd537c^0xd5378:_0x53e67d["\u006c\u0061\u0062\u0065\u006c"]++;return{'value':_0x2bc3db[0xf0483^0xf0482],"\u0064\u006f\u006e\u0065":![]};case 0x5:_0x53e67d['label']++;_0x2ddfdb=_0x2bc3db[0x1];_0x2bc3db=[0x0];continue;case 0x7:_0x2bc3db=_0x53e67d["\u006f\u0070\u0073"]["\u0070\u006f\u0070"]();_0x53e67d["\u0074\u0072\u0079\u0073"]['pop']();continue;default:if(!(_0x35f72f=_0x53e67d["\u0074\u0072\u0079\u0073"],_0x35f72f=_0x35f72f["\u006c\u0065\u006e\u0067\u0074\u0068"]>0x0&&_0x35f72f[_0x35f72f['length']-(0x6cd0e^0x6cd0f)])&&(_0x2bc3db[0x0]===(0x262e3^0x262e5)||_0x2bc3db[0x0]===0x2)){_0x53e67d=0x0;continue;}if(_0x2bc3db[0x0]===0x3&&(!_0x35f72f||_0x2bc3db[0x70775^0x70774]>_0x35f72f[0x0]&&_0x2bc3db[0x1]<_0x35f72f[0x3])){_0x53e67d["\u006c\u0061\u0062\u0065\u006c"]=_0x2bc3db[0x1];break;}if(_0x2bc3db[0x0]===(0x2a594^0x2a592)&&_0x53e67d['label']<_0x35f72f[0x7b55c^0x7b55d]){_0x53e67d["\u006c\u0061\u0062\u0065\u006c"]=_0x35f72f[0xaa282^0xaa283];_0x35f72f=_0x2bc3db;break;}if(_0x35f72f&&_0x53e67d['label']<_0x35f72f[0xb9451^0xb9453]){_0x53e67d["\u006c\u0061\u0062\u0065\u006c"]=_0x35f72f[0x2];_0x53e67d["\u006f\u0070\u0073"]['push'](_0x2bc3db);break;}if(_0x35f72f[0x2])_0x53e67d['ops']['pop']();_0x53e67d["\u0074\u0072\u0079\u0073"]["\u0070\u006f\u0070"]();continue;}_0x2bc3db=_0x350a6e['call'](_0x2fbdd6,_0x53e67d);}catch(_0x2889eb){_0x2bc3db=[0x43918^0x4391e,_0x2889eb];_0x2ddfdb=0x0;}finally{_0x3d6e40=_0x35f72f=0x6bf19^0x6bf19;}if(_0x2bc3db[0x0]&(0x22a80^0x22a85))throw _0x2bc3db[0x1];return{'value':_0x2bc3db[0x0]?_0x2bc3db[0x1]:void 0x0,'done':!![]};}};exports['__esModule']=!![];var zwsdk=function(){function _0x8519ca(){this["\u0056\u0045\u0052\u0053\u0049\u004f\u004e"]=_0x8519ca["\u0053\u0044\u004b\u0056\u0065\u0072\u0073\u0069\u006f\u006e"];var _0x5b972a=arguments["\u006c\u0065\u006e\u0067\u0074\u0068"]>0x0&&void(0x5b306^0x5b306)!==arguments[0x0]?arguments[0x0]:null;_0x8519ca["\u0056\u0045\u0052\u0053\u0049\u004f\u004e"]=this["\u0056\u0045\u0052\u0053\u0049\u004f\u004e"];var _0x66793e=wx['getEnterOptionsSync'](),_0xc27974=_0x66793e['query'],_0x2b5d82=_0x66793e['scene'];if(_0x5b972a){_0x8519ca["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['appId']=_0x5b972a["\u0061\u0070\u0070\u005f\u0069\u0064"];_0x8519ca['default']['gameId']=_0x5b972a['game_id'];_0x8519ca['default']['os']=_0x8519ca['getSystemOS']();_0x8519ca['default']['baseUrl']=_0x5b972a["\u0064\u0065\u0076"]?'https://zs.zwwlkj03.top/api':"ipa/moc.nawgnahzow.uoyz//:sptth".split("").reverse().join("");_0x8519ca['default']['query']=_0xc27974;_0x2b5d82&&(_0x8519ca['default']['query']['app_scene']=_0x2b5d82);_0x8519ca['default']['state']=_0x8519ca['getState'](_0xc27974);var _0x2c3b54=wx['getSystemInfoSync']()["\u0053\u0044\u004b\u0056\u0065\u0072\u0073\u0069\u006f\u006e"];console["\u006c\u006f\u0067"]('lib\x20version:'+_0x2c3b54);if(_0x8519ca["\u0073\u0065\u006c\u0066\u0043\u006f\u006d\u0070\u0061\u0072\u0065\u0056\u0065\u0072\u0073\u0069\u006f\u006e"](_0x2c3b54,"0.4.1".split("").reverse().join(""))>=(0x32865^0x32865)){wx['setKeepScreenOn']({'keepScreenOn':!![]});console['log']("\u5C4F\u606F\u4E0D\u7F6E\u8BBE".split("").reverse().join(""));}else{}}}_0x8519ca["\u0073\u0065\u006c\u0066\u0043\u006f\u006d\u0070\u0061\u0072\u0065\u0056\u0065\u0072\u0073\u0069\u006f\u006e"]=function(_0x2eae3d,_0x2987f8){_0x2eae3d=_0x2eae3d['split']("\u002e");_0x2987f8=_0x2987f8['split']("\u002e");var _0x5ee780=Math["\u006d\u0061\u0078"](_0x2eae3d["\u006c\u0065\u006e\u0067\u0074\u0068"],_0x2987f8["\u006c\u0065\u006e\u0067\u0074\u0068"]);while(_0x2eae3d["\u006c\u0065\u006e\u0067\u0074\u0068"]<_0x5ee780){_0x2eae3d['push']("\u0030");}while(_0x2987f8['length']<_0x5ee780){_0x2987f8['push']("\u0030");}for(var _0x2ab8c1=0x0;_0x2ab8c1<_0x5ee780;_0x2ab8c1++){var _0x37d0fe=parseInt(_0x2eae3d[_0x2ab8c1]);var _0x466569=parseInt(_0x2987f8[_0x2ab8c1]);if(_0x37d0fe>_0x466569){return 0xc8da7^0xc8da6;}else if(_0x37d0fe<_0x466569){return-0x1;}}return 0xc3706^0xc3706;};_0x8519ca['prototype']["\u0067\u0065\u0074\u0047\u0061\u006d\u0065\u0043\u006f\u006e\u0066"]=function(){return new Promise(function(_0x44794d,_0x47c7ea){_0x8519ca["\u0061\u006a\u0061\u0078"]('/mini_sdk/game/getConf',{'app_id':_0x8519ca["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]["\u0061\u0070\u0070\u0049\u0064"],"\u0067\u0061\u006d\u0065\u005f\u0069\u0064":_0x8519ca["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['gameId'],'app_version':'1.1'})["\u0074\u0068\u0065\u006e"](function(_0x1df7f6){if(_0x1df7f6["\u0073\u0074\u0061\u0074\u0075\u0073\u005f\u0063\u006f\u0064\u0065"]===(0x3dd0c^0x3dd0d)){_0x8519ca['default']['gameConfig']=_0x1df7f6["\u0064\u0061\u0074\u0061"]['data'];_0x8519ca["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['gameConfig']["\u0067\u0061\u006d\u0065\u005f\u0063\u006c\u0075\u0062"]&&_0x8519ca["\u0067\u0061\u006d\u0065\u0043\u006c\u0075\u0062\u0049\u006e\u0069\u0074"]();}_0x44794d(_0x1df7f6);});});};_0x8519ca["\u0070\u0072\u006f\u0074\u006f\u0074\u0079\u0070\u0065"]["\u006c\u006f\u0067\u0069\u006e"]=function(){var _0x193942=arguments["\u006c\u0065\u006e\u0067\u0074\u0068"]>0x0&&void 0x0!==arguments[0x0]?arguments[0xc70bb^0xc70bb]:{};return new Promise(function(_0x1807a7,_0x6d1791){wx['login']({'success':function(_0x4909bf){var _0x586d82=_0x4909bf['code'];_0x8519ca["\u0061\u006a\u0061\u0078"]("\u002f\u006d\u0069\u006e\u0069\u005f\u0073\u0064\u006b\u002f\u0061\u0075\u0074\u0068\u002f\u006c\u006f\u0067\u0069\u006e",{'code':_0x586d82,"\u0073\u0074\u0061\u0074\u0065":_0x8519ca['default']['state'],"\u0071\u0075\u0065\u0072\u0079":_0x8519ca["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]["\u0071\u0075\u0065\u0072\u0079"],'app_id':_0x8519ca['default']['appId'],'game_id':_0x8519ca["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['gameId'],'os':_0x8519ca['default']['os'],'device_number':_0x8519ca['default']["\u0064\u0065\u0076\u0069\u0063\u0065\u005f\u0062\u0072\u0061\u006e\u0064"],'device_brand':_0x8519ca['default']['device_brand']})['then'](function(_0x31d0e0){var _0xec9404=_0x31d0e0;if(_0x31d0e0['status_code']===0x1){_0x8519ca['default']['userToken']=_0x31d0e0['data']['data']["\u0075\u0073\u0065\u0072\u005f\u0074\u006f\u006b\u0065\u006e"];_0x8519ca['default']['memberId']=_0x31d0e0["\u0064\u0061\u0074\u0061"]["\u0064\u0061\u0074\u0061"]["\u006d\u0065\u006d\u0062\u0065\u0072\u005f\u0069\u0064"];_0x8519ca['initShare']();_0x8519ca['checkLoginStatus']();_0x8519ca['initSubscribeMessage']();_0x8519ca['subscribeMessageScheduled']();_0x1807a7(_0xec9404);}else{wx["\u0073\u0068\u006f\u0077\u004d\u006f\u0064\u0061\u006c"]({'title':'异常','content':_0x31d0e0['msg'],'confirmText':'我知道了','showCancel':![]});}});}});});};_0x8519ca['prototype']['updateUserInfo']=function(){var _0x131eef=arguments['length']>0x0&&void(0x4d0e0^0x4d0e0)!==arguments[0x8e9e2^0x8e9e2]?arguments[0x0]:{};return new Promise(function(_0x4c1c63,_0x2c1a7b){_0x8519ca['ajax']('/mini_sdk/member/updateInfo',{"\u0061\u0070\u0070\u005f\u0069\u0064":_0x8519ca['default']['appId'],"\u0067\u0061\u006d\u0065\u005f\u0069\u0064":_0x8519ca['default']['gameId'],'member_id':_0x8519ca["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['memberId'],"\u0072\u0061\u0077\u005f\u0064\u0061\u0074\u0061":_0x131eef['raw_data']||"".split("").reverse().join(""),'signature':_0x131eef['signature']||'','encrypted_data':_0x131eef['encrypted_data']||"".split("").reverse().join(""),'iv':_0x131eef['iv']||"".split("").reverse().join(""),"\u0075\u0073\u0065\u0072\u005f\u0069\u006e\u0066\u006f":_0x131eef['user_info']||''})['then'](function(_0x34f03d){_0x8519ca['default']['roleId']=_0x34f03d['data']["\u0064\u0061\u0074\u0061"]['role_id']||"".split("").reverse().join("");_0x4c1c63(_0x34f03d);});});};_0x8519ca['prototype']['createOrder']=function(){var _0x29420d=this;var _0x39f480=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};return new Promise(function(_0xcbd345,_0x15015b){return __awaiter(_0x29420d,void 0x0,void 0x0,function(){var _0xc2244,_0x46f289,_0x344630,_0x31aabb,_0x19a4bd,_0x5e53ed,_0x447190,_0x28fcf8,_0x1beb20,_0x24d81c;var _0x5b6ccb=this;return __generator(this,function(_0x158e15){switch(_0x158e15['label']){case 0xe91b8^0xe91b8:return[0x4bc15^0x4bc11,_0x8519ca['ajax']("etaerc/redro/kds_inim/".split("").reverse().join(""),{"\u0061\u0070\u0070\u005f\u0069\u0064":_0x8519ca["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['appId'],'game_id':_0x8519ca['default']["\u0067\u0061\u006d\u0065\u0049\u0064"],"\u006d\u0065\u006d\u0062\u0065\u0072\u005f\u0069\u0064":_0x8519ca['default']['memberId'],'os':_0x8519ca['default']['os'],'device_number':_0x8519ca["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]["\u0064\u0065\u0076\u0069\u0063\u0065\u005f\u006e\u0075\u006d\u0062\u0065\u0072"],'device_brand':_0x8519ca['default']['device_brand'],'order':_0x39f480['order']||{},'role':_0x39f480["\u0072\u006f\u006c\u0065"]||{},'role_id':_0x8519ca['default']['roleId']})];case 0x1:_0xc2244=_0x158e15['sent']();if(_0xc2244['status_code']===(0xf1ceb^0xf1cea)){_0xcbd345({"\u0073\u0074\u0061\u0074\u0075\u0073\u005f\u0063\u006f\u0064\u0065":_0xc2244["\u0073\u0074\u0061\u0074\u0075\u0073\u005f\u0063\u006f\u0064\u0065"],'msg':_0xc2244["\u006d\u0073\u0067"],"\u0064\u0061\u0074\u0061":{'data':{'order_id':_0xc2244['data']['data']['order_id']}}});_0x46f289=_0xc2244['data']['data']['pay_type'];if(_0x46f289==='customer'){wx['showModal']({'title':'充值教程','content':'即将跳转官方【客服会话】充值,给客服回复“1”获取充值链接','confirmText':'客服充值','showCancel':![],"\u0073\u0075\u0063\u0063\u0065\u0073\u0073":function(_0x2456bc){if(_0x2456bc['confirm']){console['log']('res');_0x5b6ccb["\u0063\u0075\u0073\u0074\u006f\u006d\u004d\u0065\u0073\u0073\u0061\u0067\u0065"]();}}});}if(_0x46f289==="yapinim".split("").reverse().join("")){wx['navigateToMiniProgram']({'appId':_0xc2244['data']['data']['mini_pay']['app_id'],'path':_0xc2244["\u0064\u0061\u0074\u0061"]['data']["\u006d\u0069\u006e\u0069\u005f\u0070\u0061\u0079"]['path']});}if(_0x46f289==="yapm".split("").reverse().join("")){_0x344630=_0xc2244['data']['data']["\u006d\u0070\u0061\u0079"],_0x31aabb=_0x344630['mode'],_0x19a4bd=_0x344630['env'],_0x5e53ed=_0x344630['offer_id'],_0x447190=_0x344630['currency_type'],_0x28fcf8=_0x344630['platform'],_0x1beb20=_0x344630['buy_quantity'],_0x24d81c=_0x344630['zone_id'];wx['requestMidasPayment']({'mode':_0x31aabb,'env':_0x19a4bd,'offerId':_0x5e53ed,"\u0063\u0075\u0072\u0072\u0065\u006e\u0063\u0079\u0054\u0079\u0070\u0065":_0x447190,'buyQuantity':_0x1beb20,'platform':_0x28fcf8,"\u007a\u006f\u006e\u0065\u0049\u0064":_0x24d81c,"\u006f\u0075\u0074\u0054\u0072\u0061\u0064\u0065\u004e\u006f":_0xc2244['data']['data']['order_id'],'complete':function(_0x555ee5){_0x8519ca['ajax']('/mini_sdk/mds_pay/callback',{'order_id':_0xc2244['data']['data']["\u006f\u0072\u0064\u0065\u0072\u005f\u0069\u0064"]||'','status':_0x555ee5['errCode']?![]:!![],'code':_0x555ee5['errCode'],'msg':_0x555ee5['errMsg']})['then'](function(_0x3494a0){console["\u006c\u006f\u0067"]('/mini_sdk/mds_pay/pay:',_0x3494a0);});}});}}else{_0xcbd345(_0xc2244);}return[0x2];}});});});};_0x8519ca["\u0070\u0072\u006f\u0074\u006f\u0074\u0079\u0070\u0065"]['checkOrder']=function(){var _0x540a1f=arguments['length']>0x0&&void 0x0!==arguments[0xc1f6a^0xc1f6a]?arguments[0x0]:{};return new Promise(function(_0xb66e91,_0x580e0a){_0x8519ca['ajax']("\u002f\u006d\u0069\u006e\u0069\u005f\u0073\u0064\u006b\u002f\u006f\u0072\u0064\u0065\u0072\u002f\u0067\u0065\u0074\u0050\u0061\u0079\u0053\u0074\u0061\u0074\u0075\u0073",{"\u006f\u0072\u0064\u0065\u0072":_0x540a1f['order']})["\u0074\u0068\u0065\u006e"](function(_0x26c153){_0xb66e91(_0x26c153);});});};_0x8519ca['checkLoginStatus']=function(){_0x8519ca['default']['checkLoginStatusTimer']=setTimeout(function(){_0x8519ca['ajax']("sutatSnigoLkcehc/rebmem/kds_inim/".split("").reverse().join(""),{})["\u0074\u0068\u0065\u006e"](function(_0x10c1f5){if(_0x10c1f5["\u0073\u0074\u0061\u0074\u0075\u0073\u005f\u0063\u006f\u0064\u0065"]&&_0x10c1f5["\u0073\u0074\u0061\u0074\u0075\u0073\u005f\u0063\u006f\u0064\u0065"]===-0x1){wx['showLoading']({'title':'请重新登录!','mask':!![],'complete':function(_0x121ad2){console['log']('showLoading,complete',_0x121ad2);}});wx['closeSocket']();wx["\u006f\u006e\u0053\u006f\u0063\u006b\u0065\u0074\u004f\u0070\u0065\u006e"](function(_0x193984){wx['closeSocket']();});clearInterval(_0x8519ca['default']['checkLoginStatusTimer']);}else{_0x8519ca['checkLoginStatus']();}})['catch'](function(_0x560509){_0x8519ca['checkLoginStatus']();});},0xea60);};_0x8519ca['initShare']=function(){_0x8519ca['ajax']("ofnIerahSteg/erahs/kds_inim/".split("").reverse().join(""),{"\u0067\u0061\u006d\u0065\u005f\u0069\u0064":_0x8519ca['default']['gameId'],'member_id':_0x8519ca['default']['memberId'],'app_id':_0x8519ca['default']['appId']})["\u0074\u0068\u0065\u006e"](function(_0x111950){if(_0x111950['status_code']&&_0x111950['status_code']===(0x43e3d^0x43e3c)){wx['onShareAppMessage'](function(){_0x8519ca['log']('系统转发:onShareAppMessage',{'params':{'game_id':_0x8519ca['default']["\u0067\u0061\u006d\u0065\u0049\u0064"],"\u006d\u0065\u006d\u0062\u0065\u0072\u005f\u0069\u0064":_0x8519ca['default']['memberId'],'app_id':_0x8519ca['default']['appId']},'result':_0x111950});_0x8519ca['reportShare']({'share_id':_0x111950['data']["\u0064\u0061\u0074\u0061"]['share_id']});return{'title':_0x111950['data']['data']["\u0074\u0069\u0074\u006c\u0065"],'imageUrl':_0x111950['data']['data']['share_img'],'query':'state='+_0x111950['data']['data']['state']};});wx['showShareMenu']({'withShareTicket':!![],"\u006d\u0065\u006e\u0075\u0073":["egasseMppAerahs".split("").reverse().join(""),'shareTimeline']});}});};_0x8519ca['prototype']['getShareInfo']=function(){var _0x3520bf=arguments['length']>(0x6a7cc^0x6a7cc)&&void 0x0!==arguments[0x86fe1^0x86fe1]?arguments[0x0]:{};_0x8519ca['ajax']("ofnIerahSteg/erahs/kds_inim/".split("").reverse().join(""),{"\u0067\u0061\u006d\u0065\u005f\u0069\u0064":_0x8519ca['default']['gameId'],'member_id':_0x8519ca['default']['memberId'],'app_id':_0x8519ca['default']['appId'],'path':_0x3520bf['path']||"".split("").reverse().join("")})['then'](function(_0x444cf0){if(_0x444cf0['status_code']&&_0x444cf0['status_code']===(0x77359^0x77358)){wx['onShareAppMessage'](function(){_0x8519ca['log']('系统转发:onShareAppMessage',{'params':{'game_id':_0x8519ca['default']['gameId'],"\u006d\u0065\u006d\u0062\u0065\u0072\u005f\u0069\u0064":_0x8519ca['default']['memberId'],'app_id':_0x8519ca['default']['appId'],'path':_0x3520bf['path']||''},'result':_0x444cf0});_0x8519ca['reportShare']({"\u0073\u0068\u0061\u0072\u0065\u005f\u0069\u0064":_0x444cf0['data']['data']['share_id']});return{'title':_0x444cf0['data']['data']['title'],'imageUrl':_0x444cf0['data']['data']['share_img'],'query':'state='+_0x444cf0['data']['data']['state']};});wx['showShareMenu']({"\u0077\u0069\u0074\u0068\u0053\u0068\u0061\u0072\u0065\u0054\u0069\u0063\u006b\u0065\u0074":!![],'menus':["\u0073\u0068\u0061\u0072\u0065\u0041\u0070\u0070\u004d\u0065\u0073\u0073\u0061\u0067\u0065",'shareTimeline']});if(_0x3520bf['shareAppMessage']||_0x3520bf["\u0073\u0068\u0061\u0072\u0065\u0041\u0070\u0070\u004d\u0065\u0073\u0073\u0061\u0067\u0065"]===undefined){wx['shareAppMessage']({'title':_0x444cf0['data']['data']['title'],'imageUrl':_0x444cf0['data']['data']['share_img'],'query':'state='+_0x444cf0['data']['data']['state']});_0x8519ca['reportShare']({'share_id':_0x444cf0['data']['data']['share_id']});_0x8519ca['log']('主动转发:shareAppMessage',{'share_id':_0x444cf0['data']['data']['share_id']});}}});};_0x8519ca['reportShare']=function(){var _0x4513ca=arguments['length']>(0xb5d83^0xb5d83)&&void(0x192a6^0x192a6)!==arguments[0xca8d3^0xca8d3]?arguments[0xe9cd8^0xe9cd8]:{};_0x8519ca['ajax']('/mini_sdk/share/report',{'game_id':_0x8519ca['default']['gameId'],'member_id':_0x8519ca['default']['memberId'],'app_id':_0x8519ca['default']['appId'],'share_id':_0x4513ca['share_id']||'','ext':_0x4513ca['ext']||''})['then'](function(_0x43ce23){console['log'](_0x43ce23);});};_0x8519ca['prototype']['updateRole']=function(){var _0x191454=arguments['length']>0x0&&void(0x2b58b^0x2b58b)!==arguments[0x0]?arguments[0x42416^0x42416]:{};return new Promise(function(_0x33483b,_0x25634a){_0x8519ca['ajax']('/mini_sdk/role/report',{'app_id':_0x8519ca["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]['appId'],'game_id':_0x8519ca['default']['gameId'],'member_id':_0x8519ca['default']['memberId'],'os':_0x8519ca['default']['os'],'device_number':_0x8519ca['default']['device_number'],'device_brand':_0x8519ca['default']['device_brand'],'role':_0x191454['role']||{}})["\u0074\u0068\u0065\u006e"](function(_0x43e6a7){_0x33483b(_0x43e6a7);});});};_0x8519ca['prototype']['checkMsg']=function(){var _0x9759fc=arguments['length']>0x0&&void(0xecd6c^0xecd6c)!==arguments[0x0]?arguments[0x37fca^0x37fca]:{};return new Promise(function(_0x25896,_0x152feb){_0x8519ca['ajax']('/mini_sdk/check/message',{'game_id':_0x8519ca['default']['gameId'],'member_id':_0x8519ca['default']['memberId'],'app_id':_0x8519ca['default']['appId'],'content':_0x9759fc['content']||''})['then'](function(_0x5585a7){_0x25896(_0x5585a7);});});};_0x8519ca['prototype']['checkImg']=function(){var _0x486506=arguments['length']>0x0&&void(0x4f0b4^0x4f0b4)!==arguments[0x0]?arguments[0x8d1e6^0x8d1e6]:{};return new Promise(function(_0x566659,_0x1a74b7){wx['uploadFile']({'url':_0x8519ca['default']['baseUrl']+'/mini_sdk/check/image','filePath':_0x486506['filePath'],'name':'image','header':{'User-Token':_0x8519ca['default']["\u0075\u0073\u0065\u0072\u0054\u006f\u006b\u0065\u006e"]},'formData':{'game_id':_0x8519ca['default']['gameId'],'member_id':_0x8519ca['default']['memberId'],"\u0061\u0070\u0070\u005f\u0069\u0064":_0x8519ca['default']['appId'],'user_token':_0x8519ca['default']['userToken']},'success':function(_0xf9427e){_0x566659(_0xf9427e);}});});};_0x8519ca['prototype']['checkMsgWithAI']=function(){var _0x3767f5=arguments['length']>(0x4abb6^0x4abb6)&&void 0x0!==arguments[0x0]?arguments[0x0]:{};return new Promise(function(_0x3e0d61,_0x13dfbd){_0x8519ca['ajax']('/mini_sdk/check/messageWithAICheck',{'user_token':_0x8519ca['default']['userToken'],'game_id':_0x8519ca['default']['gameId'],'member_id':_0x8519ca['default']['memberId'],'app_id':_0x8519ca['default']['appId'],'context':_0x3767f5['context']||'','context_type':_0x3767f5['context_type']||'chat','zw_app_id':_0x3767f5['zw_app_id'],'cp_role_id':_0x3767f5['cp_role_id'],'action_time':_0x3767f5['action_time'],'room_id':_0x3767f5['room_id'],'room_name':_0x3767f5['room_name'],'server_id':_0x3767f5['server_id'],'channel_id':_0x3767f5['channel_id'],'user_id':_0x3767f5['user_id'],'ip':_0x3767f5['ip']})['then'](function(_0x249332){_0x3e0d61(_0x249332);});});};_0x8519ca['prototype']['customMessage']=function(){_0x8519ca['ajax']('/mini_sdk/custom_message/config',{'game_id':_0x8519ca['default']['gameId']})['then'](function(_0x481779){if(_0x481779['status_code']===(0x83e77^0x83e76)){wx['openCustomerServiceConversation']({'sessionFrom':_0x481779['data']['data']['session_from'],'showMessageCard':_0x481779['data']['data']['show_message_card'],'sendMessageTitle':_0x481779['data']['data']["\u0073\u0065\u006e\u0064\u005f\u006d\u0065\u0073\u0073\u0061\u0067\u0065\u005f\u0074\u0069\u0074\u006c\u0065"],'sendMessagePath':_0x481779['data']['data']['send_message_path'],'sendMessageImg':_0x481779['data']['data']['send_message_img'],'complete':function(_0x7edfe7){_0x8519ca['log']('客服会话:openCustomerServiceConversation',_0x7edfe7);}});}});};_0x8519ca["\u0070\u0072\u006f\u0074\u006f\u0074\u0079\u0070\u0065"]['sendCaptcha']=function(){var _0x34a4e0=arguments['length']>0x0&&void(0xe1caa^0xe1caa)!==arguments[0x0]?arguments[0xda4dc^0xda4dc]:{};return new Promise(function(_0x300c21,_0x4f61fe){_0x8519ca['ajax']('/mini_sdk/captcha/send',{'mobile':_0x34a4e0['mobile']||''})['then'](function(_0x26402f){_0x300c21(_0x26402f);});});};_0x8519ca['prototype']['bindMobile']=function(){var _0x40dd5b=arguments['length']>0x0&&void(0x43f59^0x43f59)!==arguments[0xcb273^0xcb273]?arguments[0x0]:{};return new Promise(function(_0xde2d9f,_0x23a832){_0x8519ca['ajax']("eliboMdnib/rebmem/kds_inim/".split("").reverse().join(""),{'member_id':_0x8519ca['default']['memberId'],'mobile':_0x40dd5b['mobile']||'','code':_0x40dd5b['code']||'','key':_0x40dd5b["\u006b\u0065\u0079"]||''})['then'](function(_0x14ba24){_0xde2d9f(_0x14ba24);});});};_0x8519ca['prototype']['subscribeMessage']=function(){return __awaiter(this,void(0x35c9a^0x35c9a),void(0x71789^0x71789),function(){return __generator(this,function(_0x2feefe){wx['requestSubscribeMessage']({'tmplIds':_0x8519ca['default']['subscribeMessageList']||[],'fail':function(_0x42fd7b){console['log'](":liaf egasseMebircsbuStseuqer".split("").reverse().join(""),_0x42fd7b);},'success':function(_0x56d2cc){console['log']('requestSubscribeMessage\x20success:',_0x56d2cc);}});return[0x2];});});};_0x8519ca['initSubscribeMessage']=function(){_0x8519ca['ajax']("tsiLetalpmeTksat/ksat_inim/kds_inim/".split("").reverse().join(""),{'game_id':_0x8519ca['default']['gameId']})['then'](function(_0x54e4fc){if(_0x54e4fc["\u0073\u0074\u0061\u0074\u0075\u0073\u005f\u0063\u006f\u0064\u0065"]===0x1){_0x8519ca['default']['subscribeMessageList']=_0x54e4fc['data']['data']||[];if(_0x8519ca['default']['subscribeMessageTimer']){clearInterval(_0x8519ca['default']['subscribeMessageTimer']);_0x8519ca['subscribeMessageScheduled']();}}});};_0x8519ca['subscribeMessageScheduled']=function(){_0x8519ca['default']['subscribeMessageTimer']=setTimeout(function(){_0x8519ca['initSubscribeMessage']();},0x36ee80);};_0x8519ca['ajax']=function(_0xdb74b,_0x4c2361){var _0x614db9={'content-type':'application/json'};if(_0x8519ca['default']['userToken']){_0x614db9['User-Token']=_0x8519ca['default']['userToken'];}_0x614db9['Sdk-Version']=_0x8519ca['SDKVersion'];var _0x133947=_0x4c2361['showLoading'],_0xc6429a=_0x4c2361['loadingParams'],_0x343539=_0x4c2361['showToast'],_0x343f70=_0x4c2361['toastParams'];_0x133947&&wx['showLoading'](_0xc6429a);return new Promise(function(_0x8aa3bb,_0x251842){wx['request']({'method':'POST','url':_0x8519ca['default']['baseUrl']+_0xdb74b,'data':_0x4c2361,'header':_0x614db9,'success':function(_0x3692a5){if(_0x3692a5['data']['status_code']===-0x1){wx['showLoading']({'title':'请重新登录!','mask':!![],'complete':function(_0xab0232){console['log']('showLoading,complete',_0xab0232);}});wx['closeSocket']({'complete':function(_0x2e6935){console['log']("etelpmoc,tekcoSesolc".split("").reverse().join(""),_0x2e6935);}});wx['onSocketOpen'](function(_0x4052f7){wx['closeSocket']();});console['log']('location.reload()');location['reload']();}_0x133947&&wx['hideLoading']();if(_0x343539){_0x343f70['title']=_0x3692a5['data']['msg'];wx['showToast'](_0x343f70);}_0x8aa3bb(_0x3692a5['data']);},'fail':function(_0x4a01bb){_0x133947&&wx['hideLoading']();if(_0x343539){_0x343f70['title']=_0x4a01bb['errMsg'];wx['showToast'](_0x343f70);}_0x8aa3bb(_0x4a01bb);}});});};_0x8519ca['getSystemOS']=function(){var _0xe39833=wx['getSystemInfoSync']()['system'];if(_0xe39833['toLocaleLowerCase']()['indexOf']('android')>-0x1)return'android';if(_0xe39833['toLocaleLowerCase']()['indexOf']("soi".split("").reverse().join(""))>-0x1)return'ios';if(_0xe39833['toLocaleLowerCase']()['indexOf']('windows')>-(0x2263e^0x2263f))return'windows';if(_0xe39833['toLocaleLowerCase']()['indexOf']("socam".split("").reverse().join(""))>-(0xd417b^0xd417a))return"socam".split("").reverse().join("");return'other';};_0x8519ca['getSystemBrand']=function(){var _0x5d9fa6=wx['getSystemInfoSync']()['brand'];return _0x5d9fa6;};_0x8519ca['getSystemNumber']=function(){var _0x284cb4=wx['getSystemInfoSync']()['model'];return _0x284cb4;};_0x8519ca['midasPay']=function(_0x41fef4){return wx['requestMidasPayment'](_0x41fef4);};_0x8519ca['getQueryVariable']=function(_0x204fd8,_0x12bfa3){var _0x437ad5=_0x204fd8;var _0x1107fa=_0x437ad5['split']('&');for(var _0x14fd31=0x0;_0x14fd31<_0x1107fa['length'];_0x14fd31++){var _0x199a77=_0x1107fa[_0x14fd31]['split']('=');if(_0x199a77[0x0]===_0x12bfa3){return _0x199a77[0x1];}}return'';};_0x8519ca['getState']=function(_0xef255f){if(_0xef255f['state']){return _0xef255f['state'];}if(_0xef255f['scene']&&_0xef255f['scene']['indexOf']('state')>-0x1){return _0x8519ca['getQueryVariable'](decodeURIComponent(_0xef255f['scene']),"etats".split("").reverse().join(""));}return'';};_0x8519ca['log']=function(_0x7e48f1,_0x324537){_0x8519ca['ajax']('/mini_sdk/sdk_log/miniLog',{'name':_0x7e48f1,'value':_0x324537})['then'](function(_0x4e470c){console['log'](":gol".split("").reverse().join(""),_0x4e470c);});};_0x8519ca['gameClubInit']=function(){_0x8519ca['default']['gameClubButton']=wx['createGameClubButton']({'style':{'left':0x0,'top':0x0,'width':0x0,'height':0x0}});};_0x8519ca['prototype']['gameClubShow']=function(){_0x8519ca['default']["\u0067\u0061\u006d\u0065\u0043\u006c\u0075\u0062\u0042\u0075\u0074\u0074\u006f\u006e"]&&_0x8519ca['default']['gameClubButton']['show']();};_0x8519ca['prototype']['gameClubHide']=function(){_0x8519ca['default']['gameClubButton']&&_0x8519ca['default']['gameClubButton']['hide']();};_0x8519ca['prototype']['gameClubSetStyle']=function(_0x1c8847){if(!_0x8519ca['default']['gameClubButton'])return;_0x8519ca['default']['gameClubButton']['style']=Object['assign'](_0x8519ca['default']['gameClubButton']['style'],_0x1c8847);};_0x8519ca['SDKVersion']='1.7.3';_0x8519ca['default']={'checkLoginStatusTimer':null,'gameConfig':{},'appId':'','gameId':'','os':_0x8519ca['getSystemOS'](),'device_number':_0x8519ca['getSystemNumber'](),'device_brand':_0x8519ca['getSystemBrand'](),'memberId':'','roleId':'','playerId':'','userToken':'','baseUrl':'','subscribeMessageList':[],'subscribeMessageTimer':null,'gameClubButton':null};return _0x8519ca;}();exports["\u0064\u0065\u0066\u0061\u0075\u006c\u0074"]=zwsdk;
### 3.9 SDK 敏感词检测及 AI 检测<a name="sec3.9"></a>
### 3.9 SDK 敏感词检测及 AI 检测<a name="sec3.9"></a>
---
##### 接口说明
> **\***接口返回 Promise 对象。 该接口仅支持特定游戏,接入前需双方确认
##### 调用方式
```javascript
zwsdk.checkMsgWithAI(config:Object)
```
##### 请求参数
> | 参数 | 必选 | 类型 | 默认值 | 说明 |
> | :----------- | :--- | :----- | :----- | :-------------------------------------- |
> | context | true | String | - | 待检测内容 |
> | context_type | true | String | chat | 'chat':聊天 ;'nick':昵称 ;'post':帖子 ; |
> | zw_app_id | true | String | - | 应用 appId,由发行方提供 |
> | cp_role_id | true | String | - | 角色 ID |
> | action_time | true | String | - | 发送时间 |
> | room_id | false | String | - | 聊天室 ID |
> | room_name | false | String | - | 聊天室名 |
> | server_id | false | String | - | 区服 ID |
> | channel_id | false | String | - | 渠道 ID |
> | user_id | false | String | - | 用户 ID |
> | ip | false | String | - | 玩家 ip |
```
请注意:room_id需要传聊天室id,我们需要根据不同的聊天类型设置不同的检测规则,让消息的拦截更智能和精准。
所需的聊天类型:
● 世界:1
● 行会:2
● 系统:3
● 地图:4
● 组队:5
● 跨服:8
● 个人:100
数据传输内容
● 聊天审核:在玩家发送聊天时, 调用审核接口,其中context为聊天内容   context_type设置为 chat
● 昵称审核:在玩家设置昵称或更改昵称时,调用审核接口,  其中context为待审核文本(昵称名), context_type设置为 nick, 昵称审核时若无角色ID(cp_role_id), 则不传cp_role_id字段或传空字符串, 注意不要传0
● 行会公告审核:在玩家设置行会公告时,调用审核接口,其中context为待审核文本(公告内容), context_type设置为post
● 行会昵称审核:在玩家设置行会昵称时,调用审核接口,其中context为待审核文本(行会昵称名), context_type设置为nick
● 区服审核:当调用审核服务时,  接口传输增加一个字段,字段名为server_id 内容为区服,类型为字符串
返回结果处理
```
##### 返回参数
> | 参数 | 类型 | 说明 |
> | :---------- | :----- | :------- |
> | status_code | String | 返回状态 |
> | msg | String | 返回信息 |
> | data | Object | |
> | data.label | string | 标签 normal: 正常; politics: 政治敏感; terror: 暴恐违禁; porn: 文本色情; ad:恶意推广; curse: 咒骂敌视; nonsense: 刷屏灌水; customize: 用户自定义。 |
> | data.suggestion | String | 是否通过 pass: 通过。 review: 建议人工审核。 block: 文本不合规,建议屏蔽。 |
##### 返回数据样例
> status_code 为 1 且 data.suggestion 为 'pass' 则表示检测通过。data.suggestion 为block或review均拦截。
```javascript
{
"status_code": 1,
"msg": "操作成功",
"data": {
"suggestion": "pass",
"label": "normal"
},
"extra": {}
}
```
##### sdk 调用示例
```javascript
zwsdk
.checkMsgWithAI({
context: '中华人民共和国万岁!',
context_type: 'chat',
zw_app_id: '1234',
cp_role_id: 'cproleid1234',
action_time: '2023-12-25 18:22:54',
room_id: '123',
room_name: '聊天室名称',
server_id: '1234',
channel_id: '123',
user_id: '1234',
ip: '0.0.0.0'
})
.then((res) => {
// .......
// res.status_code 返回状态
// res.msg 返回信息
})
```
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论