1
0
Fork 0

1. 原来的小程序打开空白,需要重新编译;

2. 更新applicationId,和iOS保持一致。
master
xiaoyu 2020-11-06 17:58:23 +08:00
parent 0581a6c383
commit dc04592f6c
6 changed files with 26 additions and 50 deletions

View File

@ -4,7 +4,7 @@ android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.finogeeks.mop.demo"
applicationId "com.finogeeks.finclip.demo"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
@ -13,9 +13,9 @@ android {
multiDexEnabled true
buildConfigField "String", "APP_KEY", "\"22LyZEib0gLTQdU3MUauAVUHSFDdTToYDWCqr0AgPGwA\""
buildConfigField "String", "APP_KEY", "\"22LyZEib0gLTQdU3MUauATBwgfnTCJjdr7FCnywmAEM=\""
// App Secret
buildConfigField "String", "APP_SECRET", "\"8c5c3c26420b7e66\""
buildConfigField "String", "APP_SECRET", "\"bdfd76cae24d4313\""
// API
buildConfigField "String", "API_URL", "\"https://mp.finogeeks.com\""
// API

View File

@ -1,6 +1,7 @@
package com.finogeeks.mop.demo;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
@ -20,17 +21,20 @@ public class MainActivity extends AppCompatActivity {
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Button canvasButton = findViewById(R.id.btnCanvas);
Button demoButton = findViewById(R.id.btnDemo);
Button profileButton = findViewById(R.id.btnProfile);
canvasButton.setOnClickListener(v -> {
Map<String, String> startParams = new HashMap<>();
startParams.put("path", "/pages/index/index");
FinAppClient.INSTANCE.getAppletApiManager().startApplet(MainActivity.this, "5ea03fa563cb900001d73863", startParams);
demoButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FinAppClient.INSTANCE.getAppletApiManager().startApplet(MainActivity.this, "5fa214a29a6a7900019b5cc1");
}
});
demoButton.setOnClickListener(v -> FinAppClient.INSTANCE.getAppletApiManager().startApplet(MainActivity.this, "5ea0401463cb900001d73865"));
profileButton.setOnClickListener(v -> FinAppClient.INSTANCE.getAppletApiManager().startApplet(MainActivity.this, "5ea0412663cb900001d73867"));
Button profileButton = findViewById(R.id.btnProfile);
profileButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FinAppClient.INSTANCE.getAppletApiManager().startApplet(MainActivity.this, "5fa215459a6a7900019b5cc3");
}
});
}
}

View File

@ -25,12 +25,11 @@ public class MopApplication extends MultiDexApplication {
FinAppConfig.UIConfig uiConfig = new FinAppConfig.UIConfig();
uiConfig.setHideNavigationBarCloseButton(true);
FinAppConfig config = new FinAppConfig.Builder()
.setAppKey(BuildConfig.APP_KEY)
.setAppSecret(BuildConfig.APP_SECRET)
.setSdkKey(BuildConfig.APP_KEY)
.setSdkSecret(BuildConfig.APP_SECRET)
.setApiUrl(BuildConfig.API_URL)
.setApiPrefix(BuildConfig.API_PREFIX)
.setDebugMode(BuildConfig.DEBUG)
.setGlideWithJWT(false)
.setUiConfig(uiConfig)
.setEncryptionType(FinAppConfig.ENCRYPTION_TYPE_SM)
.build();

View File

@ -8,43 +8,25 @@
tools:context=".MainActivity"
tools:showIn="@layout/activity_main">
<Button
android:id="@+id/btnCanvas"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="172dp"
android:text="打开画图小程序"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btnDemo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="打开官方小程序"
android:text="@string/fin_clip_demo_applet"
app:layout_constraintBottom_toTopOf="@+id/btnProfile"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnCanvas" />
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<Button
android:id="@+id/btnProfile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="智能对账单"
android:text="@string/fin_clip_profile_applet"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnDemo" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="left" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,10 +0,0 @@
<menu 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"
tools:context="com.finogeeks.mop.demo.MainActivity">
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
app:showAsAction="never" />
</menu>

View File

@ -1,4 +1,5 @@
<resources>
<string name="app_name">mopdemo</string>
<string name="action_settings">Settings</string>
<string name="fin_clip_demo_applet">官方小程序</string>
<string name="fin_clip_profile_applet">智能对账单</string>
</resources>