Просмотр исходного кода

Merge branch 'master' of http://git.mokasz.com/zouyong/mk_framework

薛鸿潇 5 лет назад
Родитель
Сommit
e6c651ec3b
16 измененных файлов с 299 добавлено и 51 удалено
  1. 41 20
      assets/resources/game/prefab/tips.prefab
  2. 13 13
      assets/scene/MainScene.fire
  3. 0 1
      assets/script/game/module/module/turntable/Turnable.ts
  4. 24 13
      assets/script/mk/system/TipSystem.ts
  5. BIN
      build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/caches/build_file_checksums.ser
  6. 5 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/jarRepositories.xml
  7. 2 2
      build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/-1746423203/libcocos2dx.iml
  8. 3 2
      build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/app/mk_framework.iml
  9. 0 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_output.txt
  10. 1 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_output.txt
  11. 13 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml
  12. 4 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build.gradle
  13. 160 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/com/aries/ttaxx/wxapi/WXEntryActivity.java
  14. 5 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/AppActivity.java
  15. 26 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/thirdSdk/ThirdSdkMgr.java
  16. 2 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/build.gradle

+ 41 - 20
assets/resources/game/prefab/tips.prefab

@@ -27,14 +27,14 @@
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 8
+      "__id__": 9
     },
     "_opacity": 255,
     "_color": {
       "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
+      "r": 249,
+      "g": 247,
+      "b": 247,
       "a": 255
     },
     "_contentSize": {
@@ -93,18 +93,18 @@
     "_prefab": {
       "__id__": 4
     },
-    "_opacity": 20,
+    "_opacity": 255,
     "_color": {
       "__type__": "cc.Color",
-      "r": 227,
-      "g": 227,
-      "b": 227,
+      "r": 77,
+      "g": 80,
+      "b": 215,
       "a": 255
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 200,
-      "height": 80
+      "width": 300,
+      "height": 52
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -195,23 +195,26 @@
     "_components": [
       {
         "__id__": 6
+      },
+      {
+        "__id__": 7
       }
     ],
     "_prefab": {
-      "__id__": 7
+      "__id__": 8
     },
     "_opacity": 255,
     "_color": {
       "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
+      "r": 227,
+      "g": 218,
+      "b": 80,
       "a": 255
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 97.87,
-      "height": 50.4
+      "width": 258,
+      "height": 42.32
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -262,10 +265,10 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_string": "Label",
-    "_N$string": "Label",
-    "_fontSize": 40,
-    "_lineHeight": 40,
+    "_string": "按时发放按时发放",
+    "_N$string": "按时发放按时发放",
+    "_fontSize": 32,
+    "_lineHeight": 32,
     "_enableWrapText": true,
     "_N$file": null,
     "_isSystemFontUsed": true,
@@ -281,6 +284,24 @@
     "_id": ""
   },
   {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_width": 1,
+    "_id": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1

+ 13 - 13
assets/scene/MainScene.fire

@@ -403,8 +403,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 0,
-      "height": 0
+      "width": 750,
+      "height": 1334
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -448,27 +448,27 @@
       "__id__": 8
     },
     "_enabled": true,
-    "tween_time": 3,
+    "tween_time": 1,
     "src_x": 0,
     "src_y": 0,
     "tar_x": 0,
-    "tar_y": 100,
-    "bg_opacity": 255,
+    "tar_y": 200,
+    "bg_opacity": 100,
     "bg_color": {
       "__type__": "cc.Color",
-      "r": 200,
-      "g": 200,
-      "b": 200,
-      "a": 255
+      "r": 36,
+      "g": 47,
+      "b": 232,
+      "a": 82
     },
     "tip_color": {
       "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
+      "r": 220,
+      "g": 220,
+      "b": 80,
       "a": 255
     },
-    "tip_size": 40,
+    "tip_size": 32,
     "_id": "41Yz88THFLQYf9GACa9dX1"
   },
   {

+ 0 - 1
assets/script/game/module/module/turntable/Turnable.ts

@@ -19,7 +19,6 @@ export default class Turnable extends cc.Component {
 
     onLoad() {
         this.initData();
-        mk.tip.pop("dafdfafsafdasf");
     }
 
     /**

+ 24 - 13
assets/script/mk/system/TipSystem.ts

@@ -7,7 +7,7 @@ const { ccclass, property } = cc._decorator;
  */
 export default class TipSystem extends cc.Component {
     @property({ type: cc.Integer, displayName: "飘动时间" })
-    tween_time: number = 3;
+    tween_time: number = 1;
     @property({ type: cc.Integer, displayName: "开始坐标x" })
     src_x: number = 0;
     @property({ type: cc.Integer, displayName: "开始坐标y" })
@@ -15,7 +15,7 @@ export default class TipSystem extends cc.Component {
     @property({ type: cc.Integer, displayName: "目标坐标x" })
     tar_x: number = 0;
     @property({ type: cc.Integer, displayName: "目标坐标y" })
-    tar_y: number = 100;
+    tar_y: number = 200;
     @property({ type: cc.Integer, displayName: "背景透明度" })
     bg_opacity: number = 40;
     @property({ displayName: "背景颜色" })
@@ -25,31 +25,42 @@ export default class TipSystem extends cc.Component {
     @property({ type: cc.Integer, displayName: "文本字体" })
     tip_size: number = 40;
 
-    private labels: cc.Label[];
-
     onLoad() {
         mk.tip = this;
-        this.labels = [];
     }
 
     start() {
 
     }
 
+    /**
+     * 弹出tips
+     * @param str 
+     */
     public async pop(str: string) {
         let node = await mk.pool.getPrefab("game/prefab/tips");
         let node_bg = node.getChildByName("bg");
         let node_lbl = node.getChildByName("lbl");
-        let bg = node_bg.getComponent(cc.Sprite);
         let lbl = node_lbl.getComponent(cc.Label);
-        node_bg.opacity = this.bg_opacity;
-        // node_bg.color = 
+        // node_bg.color = this.bg_color;
+        // node_bg.opacity = this.bg_opacity;
+        // node_lbl.color = this.tip_color;
+        lbl.fontSize = this.tip_size;
+        lbl.string = str;
+        node_bg.width = node_lbl.width + 20 < 200 ? 200 : node_lbl.width + 20;
+        node.width = node_bg.width;
+        node_bg.height = node_lbl.height + 2;
+        node.parent = this.node;
+        node.x = this.src_x;
+        node.y = this.src_y;
+        cc.tween(node)
+            .to(this.tween_time, { x: this.tar_x, y: this.tar_y })
+            .call(() => {
+                node.destroy();
+                mk.pool.return("tips", node);
+            }, this)
+            .start();
     }
 
 
-}
-
-
-export enum TipType {
-    label = 1,
 }

BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/caches/build_file_checksums.ser


+ 5 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/jarRepositories.xml

@@ -36,5 +36,10 @@
       <option name="name" value="D:\Android\SDK\extras\android\m2repository" />
       <option name="url" value="file:/D:/Android/SDK/extras/android/m2repository" />
     </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>
   </component>
 </project>

+ 2 - 2
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/-1746423203/libcocos2dx.iml

@@ -33,10 +33,10 @@
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/java/src" isTestSource="false" />
     </content>
     <content url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx">
-      <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/rs/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/rs/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/resValues/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />

+ 3 - 2
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/app/mk_framework.iml

@@ -40,15 +40,15 @@
       <sourceFolder url="file://$MODULE_DIR$/../../../../Classes" isTestSource="false" />
     </content>
     <content url="file://$MODULE_DIR$/../../../app">
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/rs/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/androidTest/debug" type="java-test-resource" generated="true" />
@@ -268,6 +268,7 @@
     <orderEntry type="library" name="Gradle: ./../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/java/libs/com.android.vending.expansion.zipfile.jar" level="project" />
     <orderEntry type="library" name="Gradle: ./../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/java/libs/okhttp-3.12.7.jar" level="project" />
     <orderEntry type="library" name="Gradle: ./../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/java/libs/okio-1.15.0.jar" level="project" />
+    <orderEntry type="library" name="Gradle: com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.7.4@aar" level="project" />
     <orderEntry type="module" module-name="libcocos2dx" />
   </component>
 </module>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_output.txt


Разница между файлами не показана из-за своего большого размера
+ 1 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_output.txt


+ 13 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml

@@ -5,6 +5,9 @@
 
     <uses-feature android:glEsVersion="0x00020000" />
 
+    <!--WX SDK for mta statistics, not necessary-->
+    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
@@ -32,6 +35,16 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
+
+        <activity
+            android:name=".wxapi.WXEntryActivity"
+            android:label="@string/app_name"
+            android:theme="@android:style/Theme.Translucent.NoTitleBar"
+            android:exported="true"
+            android:taskAffinity="com.aries.ttaxx"
+            android:launchMode="singleTask">
+        </activity>
+
     </application>
     
 </manifest>

+ 4 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build.gradle

@@ -152,4 +152,8 @@ dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
     implementation fileTree(dir: "${System.getenv("COCOSCREATOR_HOME")}/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/java/libs", include: ['*.jar'])
     implementation project(':libcocos2dx')
+
+    //微信SDK(登录、分享等)
+    api 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
+
 }

+ 160 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/com/aries/ttaxx/wxapi/WXEntryActivity.java

@@ -0,0 +1,160 @@
+package com.aries.ttaxx.wxapi;
+
+import android.app.Activity;
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.widget.Toast;
+
+
+
+//import org.cocos2dx.javascript.thridSdk.ThirdSdkMgr;
+
+import com.aries.ttaxx.BuildConfig;
+import com.tencent.mm.opensdk.modelbase.BaseReq;
+import com.tencent.mm.opensdk.modelbase.BaseResp;
+import com.tencent.mm.opensdk.modelmsg.SendAuth;
+import com.tencent.mm.opensdk.openapi.IWXAPI;
+import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
+import com.tencent.mm.opensdk.openapi.WXAPIFactory;
+
+import org.cocos2dx.javascript.AppActivity;
+import org.cocos2dx.javascript.thirdSdk.ThirdSdkMgr;
+
+public class WXEntryActivity extends Activity implements IWXAPIEventHandler {
+
+    //单例模式
+    public static WXEntryActivity mInstance = null;
+
+    public static WXEntryActivity getInstance() {
+        if (null == mInstance) {
+            mInstance = new WXEntryActivity();
+        }
+        return mInstance;
+    }
+
+    //AppId(这边统一调用 BuildConfig)
+    private String AppId_WX = "wx28356dc7c541ea76";
+
+    //日志Tag
+    private  String _tag = "[WXEntryActivity] :";
+
+    private IWXAPI iwxapi;
+    private String unionid;
+    private String openid;
+    private WXEntryActivity mContext;
+    private ProgressDialog mProgressDialog;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        Log.d(this._tag, "onCreate");
+        //可以注释,因为不会自动进入这边的 onCreate() 方法 只不过需要打开该Activty才会进入
+        String APP_ID = BuildConfig.WX_APP_ID;
+        iwxapi = WXAPIFactory.createWXAPI(this, APP_ID, true);
+        handleIntent(getIntent());
+    }
+
+    /** 注册微信
+     *  @param context 调用注册的Activity 一般是AppActivity
+     */
+    public void regToWx(Context context)
+    {
+        String APP_ID = BuildConfig.WX_APP_ID;
+        Log.d(this._tag, "regToWx APP_ID: " + APP_ID);
+        iwxapi = WXAPIFactory.createWXAPI(context, APP_ID, true);
+        iwxapi.registerApp(APP_ID);
+    }
+
+    /** 开始微信授权
+     *  @param context 一般是主Activity 比如 AppActivity
+     */
+    public void startWxAuth(Context context) {
+        Log.d(this._tag, "startWxAuth ");
+        if (!iwxapi.isWXAppInstalled()) {
+            //Toast 是一个 View 视图,快速的为用户显示少量的信息。Toast 在应用程序上浮动显示信息给用户,它永远不会获得焦点,不影响用户的输入等操作,主要用于 一些帮助 / 提示。
+            Toast.makeText(context, "您的设备未安装微信客户端", Toast.LENGTH_SHORT).show();
+        } else {
+            final SendAuth.Req req = new SendAuth.Req();
+            req.scope = "snsapi_userinfo";
+            //req.state = "wechat_sdk_demo_test";
+            req.state = String.valueOf(System.currentTimeMillis());
+            iwxapi.sendReq(req);
+        }
+    }
+
+    @Override
+    protected void onNewIntent(Intent intent) {
+        super.onNewIntent(intent);
+        Log.d(this._tag, "onNewIntent");
+        this.handleIntent(intent);
+    }
+
+    private void handleIntent(Intent intent) {
+        setIntent(intent);
+        iwxapi.handleIntent(intent, this);
+    }
+
+    @Override
+    public void onReq(BaseReq baseReq) {
+
+        Log.d(this._tag, "onReq");
+    }
+
+    //请求回调结果处理
+    @Override
+    public void onResp(BaseResp baseResp) {
+        //登录微信返回回调
+        Log.d(this._tag, "onResp baseResp.errCode: "+baseResp.errCode + "");
+        switch (baseResp.errCode) {
+            case BaseResp.ErrCode.ERR_OK:
+                if (baseResp instanceof SendAuth.Resp) {
+                    String code = ((SendAuth.Resp) baseResp).code;
+//                    ThirdSdkMgr.AccessToken(code);
+                    finish();
+
+                } else {
+                    finish();
+                }
+                break;
+            case BaseResp.ErrCode.ERR_AUTH_DENIED://用户拒绝授权
+                finish();
+                break;
+            case BaseResp.ErrCode.ERR_USER_CANCEL://用户取消
+                finish();
+                break;
+            default:
+                finish();
+                break;
+        }
+    }
+
+
+//    //新写法 分返回code 可以后续借鉴
+//    public void onResp(BaseResp resp) {
+//        if (resp.errCode == BaseResp.ErrCode.ERR_OK) {
+//            if (resp.getType() == ConstantsAPI.COMMAND_SENDAUTH) {
+//                //授权登录成功
+//                String code = ((SendAuth.Resp) resp).code;
+//                String state = ((SendAuth.Resp) resp).state;
+//                Log.d(TAG, "code:===" + code + "state:===" + state);
+//                EventBus.getDefault().post(new ThirdLoginModel(code, state));
+//            } else if (resp.getType() == ConstantsAPI.COMMAND_SENDMESSAGE_TO_WX) {
+//                //分享微信回调
+//                Log.d(TAG, "====返回了====");
+//                String _type = MyWxManager.getInstance().getShareOrigin();
+//                String _target = MyWxManager.getInstance().getShareType();
+//                String _page = MyWxManager.getInstance().getSharePage();
+//                if (!TextUtils.isEmpty(_type) && !TextUtils.isEmpty(_target) && !TextUtils.isEmpty(_page)) {
+//                    MobclickUtil.Share(FrameApplication.getContext(), _type, _target, _page);
+//                }
+//            }
+//            finish();
+//        } else {
+//            finish();
+//        }
+//    }
+}

+ 5 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/AppActivity.java

@@ -24,6 +24,7 @@ THE SOFTWARE.
 ****************************************************************************/
 package org.cocos2dx.javascript;
 
+import org.cocos2dx.javascript.thirdSdk.ThirdSdkMgr;
 import org.cocos2dx.lib.Cocos2dxActivity;
 import org.cocos2dx.lib.Cocos2dxGLSurfaceView;
 
@@ -49,6 +50,10 @@ public class AppActivity extends Cocos2dxActivity {
         // DO OTHER INITIALIZATION BELOW
         SDKWrapper.getInstance().init(this);
 
+        //赋值方便调用
+        ThirdSdkMgr.appActivity = this;
+        //注册到微信
+        ThirdSdkMgr.regToWx();
     }
 
     @Override

+ 26 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/thirdSdk/ThirdSdkMgr.java

@@ -0,0 +1,26 @@
+package org.cocos2dx.javascript.thirdSdk;
+
+import android.content.Context;
+import android.util.Log;
+
+import org.cocos2dx.javascript.AppActivity;
+import com.aries.ttaxx.wxapi.WXEntryActivity;
+
+public class ThirdSdkMgr {
+
+    private static String _Tag = "[ThirdMgr]-------:";
+    /**  */
+    public static AppActivity appActivity = null;
+    /** */
+    public static WXEntryActivity wxEntryActivity = null;
+
+    public static void regToWx()
+    {
+        WXEntryActivity.getInstance().regToWx(ThirdSdkMgr.appActivity);
+    }
+
+    public static void WxAuth()
+    {
+        WXEntryActivity.getInstance().startWxAuth(ThirdSdkMgr.appActivity);
+    }
+}

+ 2 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/build.gradle

@@ -5,6 +5,7 @@ buildscript {
     repositories {
         google()
         jcenter()
+        mavenCentral()
     }
     dependencies {
         classpath 'com.android.tools.build:gradle:3.2.0'
@@ -19,6 +20,7 @@ allprojects {
     repositories {
         google()
         jcenter()
+        mavenCentral()
         flatDir {
             dirs 'libs'
         }

Некоторые файлы не были показаны из-за большого количества измененных файлов