Browse Source

接口icon修改,android修改

dart3
fff 10 months ago
parent
commit
3a67789788
  1. 30
      .metadata
  2. 2
      android/.gitignore
  3. 70
      android/app/agconnect-services.json
  4. 134
      android/app/build.gradle
  5. 61
      android/app/proguard-rules.pro
  6. 9
      android/app/src/debug/AndroidManifest.xml
  7. 100
      android/app/src/main/AndroidManifest.xml
  8. 9
      android/app/src/profile/AndroidManifest.xml
  9. 48
      android/build.gradle
  10. 5
      android/gradle.properties
  11. 7
      android/gradle/wrapper/gradle-wrapper.properties
  12. 31
      android/settings.gradle
  13. 1
      android/settings_aar.gradle
  14. 59
      android/tmpmob/ShareSDK/assets/ShareSDK.xml
  15. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  16. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  17. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  18. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  19. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  20. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  21. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  22. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  23. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  24. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  25. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  26. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  27. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  28. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  29. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  30. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  31. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  32. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  33. 15
      lib/base_state.dart
  34. 10
      lib/community/community_child_page.dart
  35. 10
      lib/community/community_course.dart
  36. 1
      lib/community/community_details.dart
  37. 3
      lib/community/community_page.dart
  38. 2
      lib/community/new_community_details.dart
  39. 2
      lib/community/order_page.dart
  40. 54
      lib/home/home_page.dart
  41. 2
      lib/home/main_home_page.dart
  42. 162
      lib/main.dart
  43. 3
      lib/main_page.dart
  44. 1
      lib/mine/mine_view/community_follow.dart
  45. 3
      lib/mine/mine_view/mine_item.dart
  46. 1
      lib/mine/mine_wallet_page.dart
  47. 2
      lib/retrofit/min_api.dart
  48. 2
      lib/retrofit/min_api.g.dart
  49. 114
      lib/retrofit/retrofit_api.dart
  50. 27
      lib/setting/about_page.dart
  51. 71
      lib/setting/treaty_page.dart
  52. 6
      lib/store/shop_details_page.dart
  53. 769
      lib/store/store_order.dart
  54. 13
      lib/store/store_view/store_info.dart
  55. 3
      lib/union/union_page.dart
  56. 18
      lib/utils/bridge.dart
  57. 4
      lib/view_widget/activity_poster.dart
  58. 2
      lib/view_widget/badge_attainment_dialog.dart
  59. 3
      lib/view_widget/my_appbar.dart
  60. 546
      pubspec.lock
  61. 7
      pubspec.yaml

30
.metadata

@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.
version:
revision: "bae5e49bc2a867403c43b2aae2de8f8c33b037e4"
revision: "68bfaea224880b488c617afe30ab12091ea8fa4e"
channel: "stable"
project_type: app
@ -13,26 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
- platform: android
create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
- platform: ios
create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
- platform: linux
create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
- platform: macos
create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
- platform: web
create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
- platform: windows
create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
# User provided section

2
android/.gitignore vendored

@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks

70
android/app/agconnect-services.json

@ -1,70 +0,0 @@
{
"agcgw":{
"backurl":"connect-drcn.dbankcloud.cn",
"url":"connect-drcn.hispace.hicloud.com",
"websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.cn",
"websocketurl":"connect-ws-drcn.hispace.dbankcloud.com"
},
"agcgw_all":{
"CN":"connect-drcn.hispace.hicloud.com",
"CN_back":"connect-drcn.dbankcloud.cn",
"DE":"connect-dre.hispace.hicloud.com",
"DE_back":"connect-dre.dbankcloud.cn",
"RU":"connect-drru.hispace.hicloud.com",
"RU_back":"connect-drru.dbankcloud.cn",
"SG":"connect-dra.hispace.hicloud.com",
"SG_back":"connect-dra.dbankcloud.cn"
},
"client":{
"cp_id":"56568071",
"product_id":"736430079245898772",
"client_id":"682378372344464128",
"client_secret":"23E8E33A66A41E524F393520B1ADD32BE20D071AC6BBD3BFD3A3711B19DF1832",
"project_id":"736430079245898772",
"app_id":"104575849",
"api_key":"CgB6e3x9vFGyCWpfisYh0nwJ+hORXbgXieLZGG4mBDz5pjZB32ahJmqyl49+Qn2noEiMEcvm8jAU42jr3sQmjsXZ",
"package_name":"com.zsw.huixiang"
},
"oauth_client":{
"client_id":"104575849",
"client_type":1
},
"app_info":{
"app_id":"104575849",
"package_name":"com.zsw.huixiang"
},
"service":{
"analytics":{
"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
"resource_id":"p1",
"channel_id":""
},
"search":{
"url":"https://search-drcn.cloud.huawei.com"
},
"cloudstorage":{
"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn"
},
"ml":{
"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
}
},
"region":"CN",
"configuration_version":"3.0",
"appInfos":[
{
"package_name":"com.zsw.huixiang",
"client":{
"app_id":"104575849"
},
"app_info":{
"package_name":"com.zsw.huixiang",
"app_id":"104575849"
},
"oauth_client":{
"client_type":1,
"client_id":"104575849"
}
}
]
}

134
android/app/build.gradle

@ -1,3 +1,10 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
// id 'com.huawei.agconnect'
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
@ -6,11 +13,6 @@ if (localPropertiesFile.exists()) {
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
@ -21,67 +23,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.mob.sdk'
apply plugin: 'com.huawei.agconnect'
MobSDK {
appKey "m33ee7650da86a"
appSecret "876f2eaebfd2a88c89d5fc294397838c"
spEdition "fp"
ShareSDK {
devInfo {
Wechat {
id 4
sortId 4
appId "wx3b269e795ed23e5f"
appSecret "64020361b8ec4c99936c0e3999a9f249"
userName "gh_afb25ac019c9"
path "pages/index/index.html?id=1"
withShareTicket true
miniprogramType 0
bypassApproval false
enable true
}
WechatMoments {
id 3
sortId 3
appId "wx3b269e795ed23e5f"
appSecret "64020361b8ec4c99936c0e3999a9f249"
bypassApproval false
enable true
}
Facebook {
id 8
sortId 8
appKey "523308712059457"
appSecret "d3a1b6377100871799d8973fbe84794a"
callbackUri "https://mob.com"
shareByAppClient true
enable true
}
Line {
id 2
sortId 2
// appKey "1656257249"
// appSecret "7f160c9686672a50b5952364a8553f99"
appKey "1656257047"
appSecret "fd93cb8f12b285b80c7c67bdee8bd091"
callbackUri "https://mob.com"
callbackscheme "huixiang"
shareByAppClient true
enable true
}
}
}
}
def mfph = [
//宿
"apk.applicationId" : "com.zsw.huixiang",
@ -90,23 +31,28 @@ def mfph = [
]
android {
compileSdkVersion 33
namespace "com.zsw.huixiang"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
main{
jniLibs.srcDirs = ['libs']
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
lintOptions {
checkReleaseBuilds false
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
applicationId "com.zsw.huixiang"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
@ -130,7 +76,6 @@ android {
v1SigningEnabled true //v1
v2SigningEnabled true //v2
}
}
buildTypes {
@ -159,45 +104,10 @@ android {
}
}
}
packagingOptions {
exclude 'assets/cfg/a/DVDirectory.cfg'
exclude 'assets/cfg/a/DVHotcity.cfg'
exclude 'assets/main_icon_zoomin.png'
exclude 'assets/cfg/a/mode_1/reduct.sty'
exclude 'assets/SDK_Default_Traffic_Texture_SevereCongestion.png'
}
aaptOptions {
additionalParameters '--auto-add-overlay'
ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"
}
}
flutter {
source '../..'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.6.5'
implementation fileTree(include: ['*.aar'], dir: 'libs')
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.facebook.fresco:fresco:1.13.0'
implementation "com.facebook.fresco:animated-gif:1.13.0"
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'com.alibaba:fastjson:1.2.54'
implementation 'com.tencent.tpns:xiaomi:1.2.7.1-release'
implementation 'com.tencent.tpns:huawei:1.2.6.0-release'
// HMS Core Push
implementation 'com.huawei.hms:push:5.3.0.304'
}
dependencies {}

61
android/app/proguard-rules.pro vendored

@ -1,61 +0,0 @@
# Flutter wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
# -keep class com.google.firebase.** { *; } // uncomment this if you are using firebase in the project
-dontwarn io.flutter.embedding.**
-ignorewarnings
# Build the ephemeral app in a module project.
# Prevents: Warning: library class <plugin-package> depends on program class io.flutter.plugin.**
# This is due to plugins (libraries) depending on the embedding (the program jar)
-dontwarn io.flutter.plugin.**
# The android.** package is provided by the OS at runtime.
-dontwarn android.**
-keep class cn.sharesdk.**{*;}
-keep class com.sina.**{*;}
-keep class com.mob.**{*;}
-keep class com.bytedance.**{*;}
-dontwarn cn.sharesdk.**
-dontwarn com.sina.**
-dontwarn com.mob.**
-keep class com.baidu.** {*;}
-keep class vi.com.** {*;}
-keep class com.baidu.vi.** {*;}
-dontwarn com.baidu.**
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep class com.tencent.android.tpush.** {*;}
-keep class com.tencent.tpns.baseapi.** {*;}
-keep class com.tencent.tpns.mqttchannel.** {*;}
-keep class com.tencent.tpns.dataacquisition.** {*;}
-keep class com.tencent.bigdata.baseapi.** {*;}
-keep class com.tencent.bigdata.mqttchannel.** {*;}
-keepclassmembers class * extends io.flutter.embedding.engine.plugins.FlutterPlugin {}
-keepclassmembers class * implements io.flutter.plugin.common.MethodChannel.MethodCallHandler {}
#andResGuard {
# whiteList = [
# "R.layout.mob_authorize_*",
# "R.drawable.mobcommon_authorize_*",
# "R.drawable.ssdk_*",
# "R.drawable.ssdk_oks_*",
# "R.string.ssdk_oks_*",
# "R.string.ssdk_*",
# "R.style.mobcommon_*",
# "R.ssdk_strings.*",
# "R.string.mobdemo_authorize_*",
# ]
#}

9
android/app/src/debug/AndroidManifest.xml

@ -1,10 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zsw.huixiang">
<!-- Flutter needs it to communicate with the running application
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

100
android/app/src/main/AndroidManifest.xml

@ -1,11 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zsw.huixiang">
<manifest xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>-->
<!-- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<!-- <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />-->
<!-- <uses-permission android:name="android.permission.READ_LOGS" />-->
<!-- <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />-->
<!-- <uses-permission android:name="android.permission.READ_LOGS" />-->
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<!--允许程序打开网络套接字-->
<uses-permission android:name="android.permission.INTERNET" />
@ -34,13 +34,15 @@
<package android:name="com.tencent.mm" />
</queries>
<application
android:label="海峡姐妹"
android:name=".HxApplication"
android:name="android.app.Application"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTask"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
@ -49,11 +51,11 @@
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"/>
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
@ -69,71 +71,35 @@
</intent-filter>
</activity>
<meta-data
android:name="XG_SERVER_SUFFIX"
android:value="tpns.sh.tencent.com" />
<meta-data android:name="WX_APPID" android:value="wx3b269e795ed23e5f" />
<meta-data android:name="weChatAppId" android:value="wx3b269e795ed23e5f" />
<meta-data android:name="WX_SECRET" android:value="c7e6d17959743ca40602acb402292e2b"/>
<activity
android:name=".wxapi.WXPayEntryActivity"
android:exported="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="sdksample" />
</intent-filter>
</activity>
<activity
android:name=".wxapi.WXEntryActivity"
android:exported="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="sdksample" />
</intent-filter>
</activity>
android:name="XG_SERVER_SUFFIX"
android:value="tpns.sh.tencent.com" />
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"/>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<activity
android:name="io.dcloud.PandoraEntryActivity"
android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale|keyboard"
android:hardwareAccelerated="true"
android:launchMode="singleTask"
android:permission="com.miui.securitycenter.permission.AppPermissionsEditor"
android:screenOrientation="user"
android:theme="@style/DCloudTheme"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<action android:name="android.intent.action.VIEW" />
<data android:scheme="h56131bcf" />
</intent-filter>
</activity>
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"/>
<service android:name="com.amap.api.location.APSService"/>
<meta-data
android:name="dcloud_appkey"
android:value="" />
<meta-data
android:name="com.amap.api.v2.apikey"
android:value="f39d1daa020a56f208eb2519f63e9534"/>
android:name="dcloud_appkey"
android:value="" />
<meta-data
android:name="com.baidu.lbsapi.API_KEY"
android:value="cdM5EPFACARrrHRjCwUEoYuzIlfFWdYP" />
android:name="com.amap.api.v2.apikey"
android:value="f39d1daa020a56f208eb2519f63e9534"/>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
android:name="com.baidu.lbsapi.API_KEY"
android:value="cdM5EPFACARrrHRjCwUEoYuzIlfFWdYP" />
</application>
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>

9
android/app/src/profile/AndroidManifest.xml

@ -1,10 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zsw.huixiang">
<!-- Flutter needs it to communicate with the running application
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

48
android/build.gradle

@ -1,39 +1,3 @@
buildscript {
ext.kotlin_version = '1.6.0'
repositories {
maven {
url 'https://maven.aliyun.com/repository/google'
}
maven {
url 'https://maven.aliyun.com/repository/jcenter'
}
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public'
}
// google()
// jcenter()
maven {
url "http://mvn.mob.com/android"
}
maven { url "https://www.jitpack.io" }
maven {url 'https://developer.huawei.com/repo/'}
maven { url 'https://repo1.maven.org/maven2/' }
}
dependencies {
// classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.huawei.agconnect:agcp:1.4.1.300'
classpath 'com.mob.sdk:MobSDK:+'
classpath 'com.android.tools.build:gradle:3.4.0'
classpath fileTree(include:['*.jar'], dir:'libs')
classpath 'com.umeng.umsdk:common:9.4.7'
classpath 'com.umeng.umsdk:asms:1.4.0'
classpath 'com.umeng.umsdk:abtest:1.0.0'
}
}
allprojects {
repositories {
maven {
@ -42,23 +6,17 @@ allprojects {
maven {
url 'https://maven.aliyun.com/repository/jcenter'
}
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public'
}
// google()
// jcenter()
maven {
url "http://mvn.mob.com/android"
}
maven { url "https://www.jitpack.io" }
maven { url 'https://developer.huawei.com/repo/'}
maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://developer.huawei.com/repo/' }
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

5
android/gradle.properties

@ -1,6 +1,3 @@
#org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx4096m
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
MobSDK.mobEnv=x
MobSDK.spEdition=FP

7
android/gradle/wrapper/gradle-wrapper.properties vendored

@ -1,10 +1,5 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
#distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
systemProp.http.proxyHost=proxy.com
systemProp.http.proxyPort=8080
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip

31
android/settings.gradle

@ -1,11 +1,26 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}
include ":app"

1
android/settings_aar.gradle

@ -1 +0,0 @@
include ':app'

59
android/tmpmob/ShareSDK/assets/ShareSDK.xml

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<DevInfor>
<SinaWeibo Enable="false" />
<TencentWeibo Enable="false" />
<Douban Enable="false" />
<QZone Enable="false" />
<Renren Enable="false" />
<KaiXin Enable="false" />
<Facebook Id="8" SortId="8" ShareByAppClient="true" Enable="true" ConsumerKey="523308712059457" ConsumerSecret="d3a1b6377100871799d8973fbe84794a" RedirectUrl="https://mob.com" />
<Twitter Enable="false" />
<Evernote Enable="false" />
<FourSquare Enable="false" />
<GooglePlus Enable="false" />
<Instagram Enable="false" />
<LinkedIn Enable="false" />
<Tumblr Enable="false" />
<Email Enable="false" />
<ShortMessage Enable="false" />
<Wechat Id="4" SortId="4" AppId="wx3b269e795ed23e5f" AppSecret="64020361b8ec4c99936c0e3999a9f249" userName="gh_afb25ac019c9" path="pages/index/index.html?id=1" WithShareTicket="true" MiniprogramType="0" BypassApproval="false" Enable="true" />
<WechatMoments Id="3" SortId="3" AppId="wx3b269e795ed23e5f" AppSecret="64020361b8ec4c99936c0e3999a9f249" BypassApproval="false" Enable="true" />
<QQ Enable="false" />
<Instapaper Enable="false" />
<Pocket Enable="false" />
<YouDao Enable="false" />
<Pinterest Enable="false" />
<Flickr Enable="false" />
<Dropbox Enable="false" />
<VKontakte Enable="false" />
<WechatFavorite Enable="false" />
<Yixin Enable="false" />
<YixinMoments Enable="false" />
<Mingdao Enable="false" />
<Line Id="2" SortId="2" AppKey="1656257047" callbackscheme="huixiang" ShareByAppClient="true" Enable="true" ChannelSecret="fd93cb8f12b285b80c7c67bdee8bd091" RedirectUri="https://mob.com" />
<WhatsApp Enable="false" />
<KakaoTalk Enable="false" />
<KakaoStory Enable="false" />
<FacebookMessenger Enable="false" />
<Alipay Enable="false" />
<AlipayMoments Enable="false" />
<Dingding Enable="false" />
<Youtube Enable="false" />
<Meipai Enable="false" />
<Telegram Enable="false" />
<Cmcc Enable="false" />
<Reddit Enable="false" />
<Telecom Enable="false" />
<Accountkit Enable="false" />
<Douyin Enable="false" />
<Wework Enable="false" />
<HWAccount Enable="false" />
<Oasis Enable="false" />
<XMAccount Enable="false" />
<SnapChat Enable="false" />
<Kuaishou Enable="false" />
<Littleredbook Enable="false" />
<Watermelonvideo Enable="false" />
<Tiktok Enable="false" />
<Taptap Enable="false" />
</DevInfor>

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

15
lib/base_state.dart

@ -1,7 +1,6 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:huixiang/utils/bridge.dart';
import 'package:shared_preferences/shared_preferences.dart';
abstract class BaseState<T extends StatefulWidget> extends State<T>
@ -40,15 +39,15 @@ abstract class BaseState<T extends StatefulWidget> extends State<T>
}
pushRoute() async {
String startIntent = await Bridge.getStartIntent();
// String startIntent = await Bridge.getStartIntent();
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
print("intent:$startIntent");
// print("intent:$startIntent");
String pushData = "";
if (startIntent != "") {
pushData = startIntent;
} else {
pushData = sharedPreferences.getString("pushData") ?? "";
}
// if (startIntent != "") {
// pushData = startIntent;
// } else {
// pushData = sharedPreferences.getString("pushData") ?? "";
// }
if (pushData == "") return;
Map<String, dynamic> pushMap = jsonDecode(pushData);
String routeName = "";

10
lib/community/community_child_page.dart

@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/community/community_view/community_dynamic.dart';
@ -13,6 +14,7 @@ import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../utils/flutter_utils.dart';
import '../utils/font_weight.dart';
@ -72,6 +74,14 @@ class CommunityChildPageState extends State<CommunityChildPage>
return;
}
isLoadingData = true;
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
userId = value.getString('userId');
apiService = ApiService(Dio(),
context: context,
token: value.getString("token"),
showLoading: false);
}
if (isLoadMore) {
pageNum += 1;
isLoadMore = false;

10
lib/community/community_course.dart

@ -1,3 +1,4 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
@ -15,6 +16,7 @@ import 'package:huixiang/view_widget/classic_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'community_view/class_list_view.dart';
import 'community_view/class_title_tab.dart';
import 'community_view/course_banner.dart';
@ -60,6 +62,14 @@ class _CommunityCourse extends State<CommunityCourse>
///banner
queryCourseBanner() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
}
BaseData<PageInfo<BannerData>>? baseData = await apiService?.queryBanner({
"model": {"type": "COURSE_BANNER"},
}).catchError((onError) {

1
lib/community/community_details.dart

@ -198,7 +198,6 @@ class _CommunityDetails extends State<CommunityDetails>
titleColor: Colors.black,
titleSize: 18.sp,
background: Colors.white,
leading: true,
leadingColor: Colors.black,
),
body: Container(

3
lib/community/community_page.dart

@ -96,7 +96,6 @@ class _CommunityPage extends State<CommunityPage>
super.build(context);
return Scaffold(
appBar: AppBar(
toolbarHeight: Get.statusBarHeight,
centerTitle: true,
title: SizedBox(
width: MediaQuery.of(context).size.width - 160,
@ -105,6 +104,8 @@ class _CommunityPage extends State<CommunityPage>
automaticIndicatorColorAdjustment: true,
isScrollable: false,
indicatorWeight: 2,
dividerHeight: 0,
dividerColor: Colors.transparent,
indicatorColor: Color(0xFF39B54A),
labelPadding: EdgeInsets.only(left: 8.w, right: 8.w),
indicatorSize: TabBarIndicatorSize.label,

2
lib/community/new_community_details.dart

@ -183,7 +183,7 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
titleColor: Colors.black,
titleSize: 18.sp,
background: Colors.white,
leading: true,
// leading: true,
leadingColor: Colors.black,
),
body: Container(

2
lib/community/order_page.dart

@ -35,7 +35,7 @@ class _OrderPage extends State<OrderPage>
child: Scaffold(
appBar: MyAppBar(
title: "",
leading: false,
// leading: false,
bottom: TabBar(
// isScrollable: true, //
indicatorColor: Color(0xff39B54A),

54
lib/home/home_page.dart

@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:flutter_swiper_view/flutter_swiper_view.dart';
import 'package:huixiang/data/msg_stats.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/home/home_view/discount_zone.dart';
import 'package:huixiang/home/home_view/home_recommend_goods.dart';
@ -100,7 +101,16 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
setState(() {});
}
});
_onRefresh(isFirstIn: true);
if (apiService == null) {
SharedPreferences.getInstance().then((value) {
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
_onRefresh(isFirstIn: true);
});
}
if (showInvite) {
inviteShowAlertDialog(widget.invite, widget.interviewCouponList?[0]);
showInvite = false;
@ -279,27 +289,27 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
}
}
///
// queryMsgStats() async {
// if (apiService == null) {
// SharedPreferences value = await SharedPreferences.getInstance();
// apiService = ApiService(
// Dio(),
// context: context,
// token: value.getString("token"),
// );
// }
// BaseData<List<MsgStats>> baseData = await apiService.stats().catchError((onError) {});
// if (baseData != null && baseData.isSuccess) {
// // setState(() {
// totalMsg = 0;
// baseData.data.forEach((element) {
// totalMsg += element.number;
// // });
// });
// }
// EasyLoading.dismiss();
// }
// /
// queryMsgStats() async {
// if (apiService == null) {
// SharedPreferences value = await SharedPreferences.getInstance();
// apiService = ApiService(
// Dio(),
// context: context,
// token: value.getString("token"),
// );
// }
// BaseData<List<MsgStats>>? baseData = await apiService?.stats().catchError((onError) {});
// if (baseData?.isSuccess ?? false) {
// setState(() {
// totalMsg = 0;
// baseData!.data?.forEach((element) {
// totalMsg += (element.number ?? 0);
// });
// });
// }
// EasyLoading.dismiss();
// }
///
queryActivity() async {

2
lib/home/main_home_page.dart

@ -52,7 +52,7 @@ class _MainHomePage extends State<MainHomePage>
appBar: MyAppBar(
background: Color(0xFFFAFAFA),
toolbarHeight: 50.h,
leading: false,
// leading: false,
systemUiOverlayStyle: SystemUiOverlayStyle.light,
action: Container(
margin: EdgeInsets.only(right: 8.w),

162
lib/main.dart

@ -165,93 +165,89 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MediaQuery(
data: const MediaQueryData(
size: Size(375, 812),
return ScreenUtilInit(
designSize: Size(375, 812),
builder: (BuildContext context, Widget? child,) => GetMaterialApp(
debugShowCheckedModeBanner: false,
title: Platform.isAndroid ? (ExamineInstance.instance.isExamine?"海峡姐妹":""):"",
theme: ThemeData(
primarySwatch: Colors.blue,
// fontFamily: 'JDZhengHT',
textTheme: TextTheme(
labelLarge: TextStyle(fontSize: 24.sp),
bodyLarge: TextStyle(fontSize: 12.sp),
bodyMedium: TextStyle(fontSize: 16.sp),
),
),
child: ScreenUtilInit(
designSize: Size(375, 812),
builder: (BuildContext context, Widget? child,) => GetMaterialApp(
debugShowCheckedModeBanner: false,
title: Platform.isAndroid ? (ExamineInstance.instance.isExamine?"海峡姐妹":""):"",
theme: ThemeData(
primarySwatch: Colors.blue,
// fontFamily: 'JDZhengHT',
textTheme: TextTheme(
labelLarge: TextStyle(fontSize: 24.sp),
bodyLarge: TextStyle(fontSize: 12.sp),
bodyMedium: TextStyle(fontSize: 16.sp),
localeResolutionCallback: (locale, supportedLocales) {
print("locale: $locale");
print("supportedLocales: $supportedLocales");
return appLocale ?? locale;
},
localizationsDelegates: [
S.delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
localeListResolutionCallback: (List<Locale>? locales, Iterable<Locale> supportedLocales) {
if (locales?.isEmpty ?? true) {
return appLocale;
}
print("locale: ${locales![0]}");
Locale? locale;
if (locales[0].countryCode == "TW") {
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW');
} else if (locales[0].countryCode == "US"){
locale = Locale.fromSubtags(languageCode: 'en', countryCode: 'US');
} else{
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH');
}
return appLocale ?? locale;
},
supportedLocales: S.delegate.supportedLocales,
home: (isFirst ?? true) ? GuidePage() : NewLoginPage(),
// home: StartPage(isFirst),
builder: EasyLoading.init(
builder: (context, widget) {
// ScreenUtil.setContext(context);
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaler: TextScaler.linear(AppUtils.textScale(context)),
),
),
localeResolutionCallback: (locale, supportedLocales) {
print("locale: $locale");
print("supportedLocales: $supportedLocales");
return appLocale ?? locale;
},
localizationsDelegates: [
S.delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
localeListResolutionCallback: (List<Locale>? locales, Iterable<Locale> supportedLocales) {
if (locales?.isEmpty ?? true) {
return appLocale;
}
print("locale: ${locales![0]}");
Locale? locale;
if (locales[0].countryCode == "TW") {
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW');
} else if (locales[0].countryCode == "US"){
locale = Locale.fromSubtags(languageCode: 'en', countryCode: 'US');
} else{
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH');
}
return appLocale ?? locale;
},
supportedLocales: S.delegate.supportedLocales,
home: (isFirst ?? true) ? GuidePage() : NewLoginPage(),
// home: StartPage(isFirst),
builder: EasyLoading.init(
builder: (context, widget) {
// ScreenUtil.setContext(context);
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaler: TextScaler.linear(AppUtils.textScale(context)),
),
child: FlutterSmartDialog(child: widget),
);
child: FlutterSmartDialog(child: widget),
);
},
),
onGenerateRoute: (settings) {
final String? name = settings.name;
if(lastRoutePage?.settings.name == name){
if(lastRoutePage?.settings.name == "/router/personal_page"
&& lastRoutePage?.navigator != null)
lastRoutePage?.navigator?.pop();
}
final Function? pageContentBuilder = routers[name];
if (pageContentBuilder != null) {
final Route route = CupertinoPageRoute(
builder: (context) {
return pageContentBuilder(context,
arguments: settings.arguments);
},
),
onGenerateRoute: (settings) {
final String? name = settings.name;
if(lastRoutePage?.settings.name == name){
if(lastRoutePage?.settings.name == "/router/personal_page"
&& lastRoutePage?.navigator != null)
lastRoutePage?.navigator?.pop();
}
final Function? pageContentBuilder = routers[name];
if (pageContentBuilder != null) {
final Route route = CupertinoPageRoute(
builder: (context) {
return pageContentBuilder(context,
arguments: settings.arguments);
},
settings: settings,
);
lastRoutePage = route;
return route;
}
return MaterialPageRoute(
//
builder: (context) {
return NewLoginPage();
},
settings: settings,
);
settings: settings,
);
lastRoutePage = route;
return route;
}
return MaterialPageRoute(
//
builder: (context) {
return NewLoginPage();
},
),
));
settings: settings,
);
},
),
);
}
}

3
lib/main_page.dart

@ -20,7 +20,6 @@ import 'package:huixiang/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/union/union_page.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/utils/bridge.dart';
import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
@ -316,7 +315,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
if (sharedPreferences.getString("token") == null ||
sharedPreferences.getString("token") == "") return;
String? startIntent;
if (Platform.isAndroid) startIntent = await Bridge.getStartIntent();
// if (Platform.isAndroid) startIntent = await Bridge.getStartIntent();
print("intent:${startIntent}");
String pushData = "";
if (startIntent != null && startIntent != "") {

1
lib/mine/mine_view/community_follow.dart

@ -67,7 +67,6 @@ class _CommunityFollow extends State<CommunityFollow>
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
toolbarHeight: kToolbarHeight + MediaQuery.of(context).padding.top,
bottom: TabBar(
// isScrollable: true, //
indicatorColor: Color(0xff39B54A),

3
lib/mine/mine_view/mine_item.dart

@ -308,6 +308,9 @@ class _MineItem extends State<MineItem> {
Expanded(
child: Container(),
),
Expanded(
child: Container(),
),
// ///
// Expanded(child: InkWell(
// onTap: () {

1
lib/mine/mine_wallet_page.dart

@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/data/base_data.dart';
import 'package:huixiang/data/page.dart';

2
lib/retrofit/min_api.dart

@ -27,7 +27,7 @@ import 'package:retrofit/retrofit.dart';
part 'min_api.g.dart';
const localBaseUrl = "http://192.168.10.78:8765/app/";///
const localBaseUrl = "http://192.168.10.54:8765/app/";///
// const localBaseUrl = "http://pos-test.api.lotus-wallet.com/app/";///

2
lib/retrofit/min_api.g.dart

@ -13,7 +13,7 @@ class _MinApiService implements MinApiService {
this._dio, {
this.baseUrl,
}) {
baseUrl ??= 'http://192.168.10.78:8765/app/';
baseUrl ??= 'http://192.168.10.54:8765/app/';
}
final Dio _dio;

114
lib/retrofit/retrofit_api.dart

@ -50,20 +50,16 @@ import 'package:huixiang/data/vip_benefit.dart';
import 'package:huixiang/data/vip_card.dart';
import 'package:huixiang/data/vip_card_home.dart';
import 'package:huixiang/data/vip_rule_details.dart';
// import 'package:gbk2utf8/gbk2utf8.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/data/activity.dart';
import 'package:huixiang/data/article.dart';
import 'package:huixiang/data/base_data.dart';
import 'package:huixiang/data/comunity_comment.dart';
import 'package:huixiang/data/coupon.dart';
import 'package:huixiang/data/farmers.dart';
import 'package:huixiang/data/order_info.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:retrofit/retrofit.dart';
import '../login/captcha/click_word_captcha.dart';
import 'package:huixiang/login/captcha/click_word_captcha.dart';
part 'retrofit_api.g.dart';
@ -99,61 +95,66 @@ abstract class ApiService {
headers: headers,
responseType: ResponseType.json,
);
dio.interceptors.add(
InterceptorsWrapper(onRequest: (RequestOptions options, RequestInterceptorHandler handler,) {
try {
debugPrint("\n======================= 请求数据 =======================");
debugPrint("method = ${options.method.toString()}");
debugPrint("url = ${options.uri.toString()}");
debugPrint("headers = ${options.headers}");
if (showLoading && !EasyLoading.isShow) {
//loading
EasyLoading.show(
if (dio.interceptors.length <= 1) {
dio.interceptors.add(
InterceptorsWrapper(onRequest: (RequestOptions options, RequestInterceptorHandler handler,) {
try {
debugPrint("\n======================= 请求数据 =======================");
debugPrint("method = ${options.method.toString()}");
debugPrint("url = ${options.uri.toString()}");
debugPrint("headers = ${options.headers}");
if (showLoading && !EasyLoading.isShow) {
//loading
EasyLoading.show(
status: S.of(context).zhengzaijiazai,
maskType: EasyLoadingMaskType.black,
);
}
if (options.data is FormData) {
debugPrint("params data = FormData");
} else {
debugPrint("params data = ${jsonEncode(options.data)}");
}
debugPrint("params queryParameters = ${options.queryParameters}");
} catch (e1) {}
handler.next(options);
}, onResponse: (Response response, ResponseInterceptorHandler handler,) {
try {
debugPrint("\n======================= 响应数据开始 =======================");
if (showLoading && EasyLoading.isShow) {
EasyLoading.dismiss();
}
debugPrint("code = ${response.statusCode}");
p(jsonEncode(response.data));
Map map = response.data;
if (map["code"] == 40005 || map["code"] == 40001) {
if (!LoginTipsDialog().isShow) {
print("show: ${LoginTipsDialog().isShow}");
LoginTipsDialog().show(context);
);
}
if (options.data is FormData) {
debugPrint("params data = FormData");
} else {
debugPrint("params data = ${jsonEncode(options.data)}");
}
debugPrint("params queryParameters = ${options.queryParameters}");
} catch (e1) {}
handler.next(options);
}, onResponse: (Response response, ResponseInterceptorHandler handler,) {
try {
debugPrint("\n======================= 响应数据开始 =======================");
if (showLoading && EasyLoading.isShow) {
EasyLoading.dismiss();
}
debugPrint("code = ${response.statusCode}");
p(jsonEncode(response.data));
if (response.data is Map) {
Map map = response.data;
if (map["code"] == 40005 || map["code"] == 40001) {
if (!LoginTipsDialog().isShow) {
print("show: ${LoginTipsDialog().isShow}");
LoginTipsDialog().show(context);
}
}
debugPrint("======================= 响应数据结束 =======================\n");
if(map["code"] == 0 || map["code"] == 200) {
}
}
handler.next(response);
} catch (e2) {
print("respon: ${e2}");
}
debugPrint("======================= 响应数据结束 =======================\n");
if(map["code"] == 0 || map["code"] == 200) {
}, onError: (DioException e, ErrorInterceptorHandler handler,) {
if (EasyLoading.isShow) {
EasyLoading.dismiss();
}
handler.next(response);
} catch (e2) {
print("respon: ${e2}");
}
}, onError: (DioException e, ErrorInterceptorHandler handler,) {
if (EasyLoading.isShow) {
EasyLoading.dismiss();
}
debugPrint("\n======================= 错误响应数据 =======================");
debugPrint("type = ${e.type}");
debugPrint("message = ${e.message}");
debugPrint("\n");
handler.next(e);
}),
);
debugPrint("\n======================= 错误响应数据 =======================");
debugPrint("type = ${e.type}");
debugPrint("message = ${e.message}");
debugPrint("\n");
handler.next(e);
}),
);
}
return _ApiService(dio, baseUrl: baseUrl);
}
@ -314,8 +315,7 @@ abstract class ApiService {
///banner查询
@POST("/banner/page")
Future<BaseData<PageInfo<BannerData>>> queryBanner(
@Body() Map<String, dynamic> param);
Future<BaseData<PageInfo<BannerData>>> queryBanner(@Body() Map<String, dynamic> param);
///
@GET("/home/brand")

27
lib/setting/about_page.dart

@ -4,7 +4,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/bridge.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:package_info_plus/package_info_plus.dart';
@ -44,7 +43,11 @@ class _AboutPage extends State<AboutPage> {
Container(
decoration: new BoxDecoration(
border: Border(
bottom: BorderSide(color: Color(0xffF7F7F7), width: 0.0)),
bottom: BorderSide(
color: Color(0xffF7F7F7),
width: 0.0,
),
),
color: Color(0xffF7F7F7),
),
padding: EdgeInsets.only(top: 25),
@ -54,7 +57,7 @@ class _AboutPage extends State<AboutPage> {
child:Column(
children: [
Image.asset(
"assets/image/icon_about_logo.png",
"assets/image/icon_about_logo.webp",
width: 130,
height: 130,
),
@ -93,12 +96,12 @@ class _AboutPage extends State<AboutPage> {
GestureDetector(
child: settingSingleItem(S.of(context).geiwopingfen),
onTap: () {
Bridge.toAppStore().then((value) {
if (Platform.isAndroid && value == "0") {
SmartDialog.showToast("手机没有安装应用市场app",
alignment: Alignment.center);
}
});
// Bridge.toAppStore().then((value) {
// if (Platform.isAndroid && value == "0") {
// SmartDialog.showToast("手机没有安装应用市场app",
// alignment: Alignment.center);
// }
// });
},
),
GestureDetector(
@ -217,7 +220,8 @@ class _AboutPage extends State<AboutPage> {
size: 24,
),
],
)),
),
),
],
),
);
@ -257,7 +261,8 @@ class _AboutPage extends State<AboutPage> {
),
),
],
)),
),
),
],
),
);

71
lib/setting/treaty_page.dart

@ -22,28 +22,7 @@ class _TreatyPage extends State<TreatyPage> {
@override
void initState() {
super.initState();
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black);
_webViewController = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setNavigationDelegate(
NavigationDelegate(
onProgress: (int progress) {},
onPageStarted: (String url) {},
onPageFinished: (String url) {
EasyLoading.dismiss();
},
onWebResourceError: (WebResourceError error) {},
onNavigationRequest: (NavigationRequest request) {
// if (request.url.startsWith('https://www.youtube.com/')) {
// return NavigationDecision.prevent;
// }
return NavigationDecision.navigate;
},
),
)
..loadRequest(Uri.parse("http://huixiang.lotus-wallet.com/Privacy.html"));
// EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black);
}
@override
@ -59,12 +38,52 @@ class _TreatyPage extends State<TreatyPage> {
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
alignment: Alignment.center,
child:
WebViewWidget(
controller: _webViewController,
alignment: Alignment.center, //TreatyPage
child: FutureBuilder(
future: loadWeb(),
builder: (context, AsyncSnapshot snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return Center(
child: CircularProgressIndicator(),
);
} else if (snapshot.hasError) {
return Text("加载失败");
} else {
return snapshot.data ?? Text("NO DATA");
}
},
),
),
);
}
Future<Widget> loadWeb() async {
Widget res ;
try {
_webViewController = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
// ..setNavigationDelegate(
// NavigationDelegate(
// onProgress: (int progress) {},
// onPageStarted: (String url) {},
// onPageFinished: (String url) {
// EasyLoading.dismiss();
// },
// onWebResourceError: (WebResourceError error) {},
// onNavigationRequest: (NavigationRequest request) {
// // if (request.url.startsWith('https://www.youtube.com/')) {
// // return NavigationDecision.prevent;
// // }
// return NavigationDecision.navigate;
// },
// ),
// )
..loadRequest(Uri.parse("https://huixiang.lotus-wallet.com/Privacy.html"));
res = WebViewWidget(controller: _webViewController);
} catch (error) {
res = Text("加载失败");
}
return res;
}
}

6
lib/store/shop_details_page.dart

@ -96,6 +96,12 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
queryStoreInfo() async {
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black);
SharedPreferences value = await SharedPreferences.getInstance();
if (apiService == null)
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
BaseData? baseData = await apiService?.queryStoreInfo(storeId).catchError((error) {
debugPrint(error);
});

769
lib/store/store_order.dart

@ -8,6 +8,7 @@ import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:flutter_swiper_view/flutter_swiper_view.dart';
import 'package:get/get.dart';
import 'package:huixiang/data/member_vo.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/data/activity.dart';
@ -22,6 +23,7 @@ import 'package:huixiang/store/store_view/product_sku.dart';
import 'package:huixiang/store/store_view/shop_car.dart';
import 'package:huixiang/store/store_view/store_info.dart';
import 'package:huixiang/store/store_view/store_order_list.dart';
import 'package:huixiang/utils/constant.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart';
@ -80,6 +82,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
tenant = widget.arguments?["tenant"];
storeId = widget.arguments?["id"];
tabcontroller = TabController(length: 1, vsync: this);
debugPrint(
"store_param tableId:$tableId tenant:$tenant storeId:$storeId");
@ -190,7 +194,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
});
if (baseData?.isSuccess ?? false) {
storeInfo = StoreInfo.fromJson(baseData!.data);
activitys = storeInfo?.informationVOPageVO?.list?.map((e) => Activity.fromJson(e)).toList();
activitys = storeInfo?.informationVOPageVO?.list
?.map((e) => Activity.fromJson(e))
.toList();
if (mounted) {
setState(() {});
}
@ -203,368 +209,387 @@ class _StoreOrderPage extends State<StoreOrderPage>
@override
Widget build(BuildContext context) {
return PopScope(
onPopInvoked: (isPop) {
if (dialogShowing) {
SmartDialog.dismiss();
}
},
canPop: false,
child: Container(
color: Colors.white,
child: Stack(
children: [
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 54.h,
child: NestedScrollView(
controller: controller,
dragStartBehavior: DragStartBehavior.start,
physics: BouncingScrollPhysics(),
headerSliverBuilder:
(BuildContext context, bool innerScrolled) {
return [
SliverOverlapAbsorber(
handle:
NestedScrollView.sliverOverlapAbsorberHandleFor(
context),
sliver: SliverAppBar(
expandedHeight: (storeInfo?.couponVOList != null)
? 400.h
: 395.h,
floating: false,
snap: false,
pinned: true,
stretch: false,
systemOverlayStyle: SystemUiOverlayStyle.light,
leading: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pop();
},
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.transparent,
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(10.h),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
onPopInvoked: (isPop) {
if (dialogShowing) {
SmartDialog.dismiss();
}
},
canPop: false,
child: Container(
color: Colors.white,
child: Stack(
children: [
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 54.h,
child: NestedScrollView(
controller: controller,
dragStartBehavior: DragStartBehavior.start,
physics: BouncingScrollPhysics(),
headerSliverBuilder: (BuildContext context, bool innerScrolled) {
return [
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar(
expandedHeight: (storeInfo?.couponVOList?.isNotEmpty ?? true) ? 440.h : 395.h,
floating: false,
snap: false,
pinned: true,
leading: null,
stretch: false,
toolbarHeight: Get.statusBarHeight,
systemOverlayStyle: SystemUiOverlayStyle.light,
flexibleSpace: FlexibleSpaceBar(
title: Title(
controller,
storeInfo?.storeName ?? '',
(alpha) {
setState(() {
if (alpha == 1)
scrollPhysics = BouncingScrollPhysics();
else
scrollPhysics =
NeverScrollableScrollPhysics();
});
},
),
collapseMode: CollapseMode.pin,
stretchModes: [
StretchMode.zoomBackground,
StretchMode.fadeTitle,
StretchMode.blurBackground,
],
background: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
flexibleSpace: FlexibleSpaceBar(
title: Title(controller,
storeInfo!.storeName ?? '',
(alpha) {
setState(() {
if (alpha == 1)
scrollPhysics = BouncingScrollPhysics();
else
scrollPhysics =
NeverScrollableScrollPhysics();
});
}),
collapseMode: CollapseMode.pin,
stretchModes: [
StretchMode.zoomBackground,
StretchMode.fadeTitle,
StretchMode.blurBackground,
child: Stack(
children: [
Positioned(
child: Column(
children: [
buildSwiper(),
Expanded(
child: Container(
color: Colors.transparent,
),
flex: 1,
),
],
),
top: 0,
bottom: 0,
left: 0,
right: 0,
),
Positioned(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
///
StoreInfoView(
storeInfo,
widget.arguments?["distance"],
),
// Padding(padding:EdgeInsets.only(left: 14.w),
// child: Text(
// S.of(context).diandan,
// style: TextStyle(
// fontWeight: MyFontWeight.bold,
// fontSize: 15.sp,
// color: Color(0xFF000000),
// ),
// ),),
// Container(
// width:22.w,
// height: 3.h,
// color: Color(0xFF32A060),
// margin: EdgeInsets.only(top: 5.h,left: 14.w),
// ),
// ///
// if (storeInfo != null &&
// storeInfo.couponVOList != null)
// UnionCoupon(
// storeInfo,
// _receiveCoupon,
// coupon: true,
// ),
//
// if (storeInfo == null ||
// storeInfo.couponVOList == null)
// SizedBox(
// height: 8,
// ),
//
// ///VIP信息
// Vip(storeInfo, () {}, false),
],
),
),
top: 233.h,
bottom: 0,
left: 0,
right: 0,
),
Positioned(
top: 40,
left: 0,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pop();
},
child: Container(
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(10.h),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
)
],
background: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
),
),
backgroundColor: Color(0x33FAFAFA),
centerTitle: false,
elevation: 0,
leadingWidth: 0,
automaticallyImplyLeading: false,
bottom: PreferredSize(
preferredSize: Size(
Get.width,
38.h,
),
child: Container(
width: Get.width,
child: Theme(
data: ThemeData(
splashColor: Colors.transparent,
//
highlightColor: Colors.transparent, //
),
child: Stack(
child: Row(
children: [
Positioned(
child: Column(
children: [
buildSwiper(),
Expanded(
child: Container(
color: Colors.transparent,
),
flex: 1,
20.vd,
Column(
children: [
Text( // Color(0xFF32A060),
S.of(context).diandan,
style: TextStyle(
color: Colors.black,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
],
),
top: 0,
bottom: 0,
left: 0,
right: 0,
),
Positioned(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.circular(8.w),
),
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
///
StoreInfoView(
storeInfo,
widget.arguments?["distance"],
),
// Padding(padding:EdgeInsets.only(left: 14.w),
// child: Text(
// S.of(context).diandan,
// style: TextStyle(
// fontWeight: MyFontWeight.bold,
// fontSize: 15.sp,
// color: Color(0xFF000000),
// ),
// ),),
// Container(
// width:22.w,
// height: 3.h,
// color: Color(0xFF32A060),
// margin: EdgeInsets.only(top: 5.h,left: 14.w),
// ),
// ///
// if (storeInfo != null &&
// storeInfo.couponVOList != null)
// UnionCoupon(
// storeInfo,
// _receiveCoupon,
// coupon: true,
// ),
//
// if (storeInfo == null ||
// storeInfo.couponVOList == null)
// SizedBox(
// height: 8,
// ),
//
// ///VIP信息
// Vip(storeInfo, () {}, false),
],
5.d,
Container(
width: 20,
height: 3,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
color: Color(0xFF32A060),
),
),
),
top: 233.h,
bottom: 0,
left: 0,
right: 0,
10.d,
],
),
// SizedBox(
// child: TabBar(
// controller: tabcontroller,
// automaticIndicatorColorAdjustment: true,
// isScrollable: false,
// indicatorWeight: 3,
// dividerColor: Colors.transparent,
// dividerHeight: 0,
// indicatorColor: Color(0xFF32A060),
// labelPadding: EdgeInsets.only(
// left: 8.w,
// right: 8.w,
// ),
// indicatorSize: TabBarIndicatorSize.label,
// unselectedLabelStyle: TextStyle(
// fontSize: 15.sp,
// fontWeight: FontWeight.w400,
// ),
// labelStyle: TextStyle(
// color: Colors.black,
// fontSize: 18.sp,
// fontWeight: FontWeight.bold,
// ),
// labelColor: Colors.black,
// tabs: [
// MyTab(text: S.of(context).diandan),
// // MyTab(text: ""),
// ],
// ),
// ),
Spacer(),
],
),
),
),
backgroundColor: Color(0x33FAFAFA),
centerTitle: false,
elevation: 0,
bottom: PreferredSize(
preferredSize: Size(
MediaQuery.of(context).size.width,
38.h,
),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10.w),
width: MediaQuery.of(context).size.width,
child: Theme(
data: ThemeData(
splashColor: Colors.transparent,
//
highlightColor:
Colors.transparent, //
),
child: TabBar(
controller: tabcontroller,
automaticIndicatorColorAdjustment: true,
isScrollable: true,
indicatorWeight: 3,
indicatorColor: Color(0xFF32A060),
labelPadding: EdgeInsets.only(
left: 8.w,
right: 8.w,
),
indicatorSize: TabBarIndicatorSize.label,
unselectedLabelStyle: TextStyle(
fontSize: 15.sp,
fontWeight: FontWeight.w400,
),
labelStyle: TextStyle(
color: Colors.black,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
labelColor: Colors.black,
tabs: [
MyTab(text: S.of(context).diandan),
// MyTab(text: ""),
],
)),
),
),
),
),
];
},
),
),
];
},
///
body: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
///
body: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
///
StoreOrderListPage(
widget.arguments,
activitys,
storeInfo,
shopCarGoods,
controller,
minToken,
tenant,
tableId,
_queryMiNiDetail, () {
queryShopCar().then((value) {
this.shopCarGoods = value;
setState(() {});
});
}, scrollPhysics),
StoreOrderListPage(
widget.arguments,
activitys,
storeInfo,
shopCarGoods,
controller,
minToken,
tenant,
tableId,
_queryMiNiDetail, () {
queryShopCar().then((value) {
this.shopCarGoods = value;
setState(() {});
});
}, scrollPhysics),
///,
// StoreActivity(
// widget.arguments,
// activitys,
// ),
],
controller: tabcontroller,
),
),
/*SmartRefresher(
controller: refreshController =
RefreshController(initialRefresh: false),
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
physics: BouncingScrollPhysics(),
onRefresh: () {
queryStoreInfo();
},
child:
),*/
///,
// StoreActivity(
// widget.arguments,
// activitys,
// ),
],
controller: tabcontroller,
),
Positioned(
bottom: 30,
left: 0,
right: 0,
child: Stack(
alignment: Alignment.bottomLeft,
children: [
Container(
margin: EdgeInsets.symmetric(horizontal: 14),
height: 45.h,
// color: Color(0xFFFAFAFA),
decoration: BoxDecoration(
color: Color(0xFF383A38),
borderRadius: BorderRadius.circular(100),
),
),
Positioned(
bottom: 30,
left: 0,
right: 0,
child: Stack(
alignment: Alignment.bottomLeft,
children: [
Container(
margin: EdgeInsets.symmetric(horizontal: 14),
height: 45.h,
// color: Color(0xFFFAFAFA),
decoration: BoxDecoration(
color: Color(0xFF383A38),
borderRadius: BorderRadius.circular(100),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 45.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 45.w,
),
Text.rich(
TextSpan(children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFFFFFFFF),
fontWeight: MyFontWeight.bold,
),
),
TextSpan(
text: "${shopCarGoods?.cartSum ?? 0}",
style: TextStyle(
fontSize: 20.sp,
fontFamily: 'JDZhengHT',
color: Color(0xFFFFFFFF),
fontWeight: MyFontWeight.medium,
),
),
]),
),
Spacer(),
GestureDetector(
onTap: () {
if (AppUtils.compareTime(
storeInfo?.openStartTime,
DateFormat('HH:mm:ss')
.format(DateTime.now())) &&
(!AppUtils.compareTime(
storeInfo?.openEndTime,
DateFormat('HH:mm:ss')
.format(DateTime.now())))) {
toDownOrder();
} else
SmartDialog.showToast(
"营业时间:${storeInfo?.openStartTime}-${storeInfo?.openEndTime}",
alignment: Alignment.center);
},
child: RoundButton(
width: 103.w,
height: 54.h,
text: S.current.jiesuan,
textColor: Colors.white,
Text.rich(
TextSpan(children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFFFFFFFF),
fontWeight: MyFontWeight.bold,
backgroup: Color(0xFF32A060),
radius: 100,
fontSize: 16.sp,
padding: EdgeInsets.symmetric(vertical: 5.h),
),
),
],
),
),
Stack(
children: [
InkWell(
onTap: () {
if (count() != 0) showShoppingCart();
},
child: Image.asset(
"assets/image/shopping_bag.webp",
width: 66,
height: 66,
fit: BoxFit.fitWidth,
),
),
if (count() != 0)
Positioned(
right: 5,
// top: 14,
child: RoundButton(
width: 17.w,
height: 17.h,
text: "${count()}",
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFFF65720),
fontSize: 12.sp,
radius: 100,
TextSpan(
text: "${shopCarGoods?.cartSum ?? 0}",
style: TextStyle(
fontSize: 20.sp,
fontFamily: 'JDZhengHT',
color: Color(0xFFFFFFFF),
fontWeight: MyFontWeight.medium,
),
),
],
]),
),
Spacer(),
GestureDetector(
onTap: () {
if (AppUtils.compareTime(
storeInfo?.openStartTime,
DateFormat('HH:mm:ss')
.format(DateTime.now())) &&
(!AppUtils.compareTime(
storeInfo?.openEndTime,
DateFormat('HH:mm:ss')
.format(DateTime.now())))) {
toDownOrder();
} else
SmartDialog.showToast(
"营业时间:${storeInfo?.openStartTime}-${storeInfo?.openEndTime}",
alignment: Alignment.center);
},
child: RoundButton(
width: 103.w,
height: 54.h,
text: S.current.jiesuan,
textColor: Colors.white,
fontWeight: MyFontWeight.bold,
backgroup: Color(0xFF32A060),
radius: 100,
fontSize: 16.sp,
padding: EdgeInsets.symmetric(vertical: 5.h),
),
),
],
),
),
Stack(
children: [
InkWell(
onTap: () {
if (count() != 0) showShoppingCart();
},
child: Image.asset(
"assets/image/shopping_bag.webp",
width: 66,
height: 66,
fit: BoxFit.fitWidth,
),
),
if (count() != 0)
Positioned(
right: 5,
// top: 14,
child: RoundButton(
width: 17.w,
height: 17.h,
text: "${count()}",
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFFF65720),
fontSize: 12.sp,
radius: 100,
),
),
],
),
),
],
],
),
),
],
),
),
);
}
@ -695,7 +720,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
),
);
},
itemCount: storeInfo?.bannerList?.length ?? 1,
itemCount: storeInfo?.bannerList?.length ?? 1,
),
);
}
@ -767,19 +792,19 @@ class _StoreOrderPage extends State<StoreOrderPage>
EasyLoading.dismiss();
dialogShowing = true;
showModalBottomSheet(
backgroundColor: Colors.transparent,
context: context,
isDismissible: false,
builder: (_) {
return ProductSku(
miniDetail,
shopCarGoods,
id,
_addShopCar,
add,
reduce,
);
},
backgroundColor: Colors.transparent,
context: context,
isDismissible: false,
builder: (_) {
return ProductSku(
miniDetail,
shopCarGoods,
id,
_addShopCar,
add,
reduce,
);
},
);
}
}
@ -836,8 +861,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
// EasyLoading.dismiss();
if (baseDate?.isSuccess ?? false) {
this.shopCarGoods = await queryShopCar();
if (miniDetail?.subscribeParam?.isEnableSubscribe ?? false)
toDownOrder();
if (miniDetail?.subscribeParam?.isEnableSubscribe ?? false) toDownOrder();
setState(() {});
} else {
SmartDialog.showToast("${baseDate?.msg}", alignment: Alignment.center);
@ -853,7 +877,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
if (storeInfo?.posType?.code == "NORMALSTORE" && tableId == 0) {
return null;
}
BaseData<List<ShoppingCart>>? baseDate = await minService?.getShoppingCart(tableId);
BaseData<List<ShoppingCart>>? baseDate =
await minService?.getShoppingCart(tableId);
if ((baseDate?.isSuccess ?? false) && (baseDate!.data?.length ?? 0) > 0) {
if (baseDate.data![0].selectDiscount == 1) {
baseDate.data![0].couponList?.forEach((element) {
@ -881,7 +906,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
Map<String, dynamic> shopCarTemp = shopCarGoods?.toJson() ?? {};
cartSkuItem.buyNum = (cartSkuItem.buyNum ?? 0) + 1;
shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()];
BaseData<List<ShoppingCart>>? baseDate = await minService?.shoppingCartSingle(shopCarTemp);
BaseData<List<ShoppingCart>>? baseDate =
await minService?.shoppingCartSingle(shopCarTemp);
if (baseDate?.isSuccess ?? false) {
this.shopCarGoods = await queryShopCar();
shopCartKey.currentState?.setState(() {});
@ -895,7 +921,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
Map<String, dynamic> shopCarTemp = shopCarGoods?.toJson() ?? {};
cartSkuItem.buyNum = (cartSkuItem.buyNum ?? 0) - 1;
shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()];
BaseData<List<ShoppingCart>>? baseDate = await minService?.shoppingCartSingle(shopCarTemp);
BaseData<List<ShoppingCart>>? baseDate =
await minService?.shoppingCartSingle(shopCarTemp);
if (baseDate?.isSuccess ?? false) {
EasyLoading.dismiss();
this.shopCarGoods = await queryShopCar();
@ -909,25 +936,31 @@ class _StoreOrderPage extends State<StoreOrderPage>
///1
add(MiniDetail miniDetail, selectSkus) async {
ProductSkuVOList? productSku = miniDetail.productSkuVOList?.firstWhere((element) {
ProductSkuVOList? productSku =
miniDetail.productSkuVOList?.firstWhere((element) {
return skuY(element, selectSkus);
});
String? skuId = productSku?.id;
int shopSkuIndex = shopCarGoods?.shoppingCartSkuItemList?.indexWhere((element) => skuId == element.id) ?? -1;
int shopSkuIndex = shopCarGoods?.shoppingCartSkuItemList
?.indexWhere((element) => skuId == element.id) ??
-1;
Map<String, dynamic>? shopCarTemp = shopCarGoods?.toJson();
shopCarGoods?.tableId = "$tableId";
if (shopSkuIndex >= 0) {
int buy = shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum ?? 0;
int buy =
shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum ?? 0;
shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum = (buy + 1);
SkuItemList? cartSkuItem = shopCarGoods?.shoppingCartSkuItemList?.firstWhere((element) => skuId == element.id);
SkuItemList? cartSkuItem = shopCarGoods?.shoppingCartSkuItemList
?.firstWhere((element) => skuId == element.id);
shopCarTemp?["shoppingCartSkuItemList"] = [cartSkuItem?.toJson()];
} else {
await _addShopCar(miniDetail, selectSkus, 1);
return;
}
BaseData<List<ShoppingCart>>? baseDate = await minService?.shoppingCartSingle(shopCarTemp ?? {});
BaseData<List<ShoppingCart>>? baseDate =
await minService?.shoppingCartSingle(shopCarTemp ?? {});
if (baseDate?.isSuccess ?? false) {
this.shopCarGoods = await queryShopCar();
debugPrint("count.toString()");
@ -944,20 +977,26 @@ class _StoreOrderPage extends State<StoreOrderPage>
return skuY(element, selectSkus);
});
String? skuId = productSku?.id;
SkuItemList? shopSkuItem = shopCarGoods?.shoppingCartSkuItemList?.firstWhere((element) => skuId == element.id);
int shopSkuIndex = shopCarGoods?.shoppingCartSkuItemList?.indexWhere((element) => skuId == element.id) ?? -1;
SkuItemList? shopSkuItem = shopCarGoods?.shoppingCartSkuItemList
?.firstWhere((element) => skuId == element.id);
int shopSkuIndex = shopCarGoods?.shoppingCartSkuItemList
?.indexWhere((element) => skuId == element.id) ??
-1;
if ((shopSkuItem?.buyNum ?? 0) > 1) {
int butNum = shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum ?? 0;
int butNum =
shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum ?? 0;
shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum = butNum - 1;
}
shopCarGoods?.tableId = "$tableId";
Map<String, dynamic>? shopCarTemp = shopCarGoods?.toJson();
SkuItemList? cartSkuItem = shopCarGoods?.shoppingCartSkuItemList?.firstWhere((element) => skuId == element.id);
SkuItemList? cartSkuItem = shopCarGoods?.shoppingCartSkuItemList
?.firstWhere((element) => skuId == element.id);
shopCarTemp?["shoppingCartSkuItemList"] = [cartSkuItem?.toJson()];
BaseData<List<ShoppingCart>>? baseDate = await minService?.shoppingCartSingle(shopCarTemp ?? {});
BaseData<List<ShoppingCart>>? baseDate =
await minService?.shoppingCartSingle(shopCarTemp ?? {});
if (baseDate?.isSuccess ?? false) {
queryShopCar().then((value) {
this.shopCarGoods = value;

13
lib/store/store_view/store_info.dart

@ -171,9 +171,9 @@ class _StoreInfoView extends State<StoreInfoView> {
},
);
},
child:Container(
child: Container(
color: Colors.transparent,
padding:EdgeInsets.only(right: 8.w,bottom: 16.h) ,
padding:EdgeInsets.only(right: 8.w,bottom: 8.h) ,
child: Image.asset(
"assets/image/icon_union_location.webp",
width: 20,
@ -195,7 +195,8 @@ class _StoreInfoView extends State<StoreInfoView> {
},
);
},
child:Padding(padding: EdgeInsets.only(bottom: 16.h,),
child:Padding(
padding: EdgeInsets.only(bottom: 8.h,),
child: Text(
"${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo!.address : ""}",
maxLines: 2,
@ -210,13 +211,13 @@ class _StoreInfoView extends State<StoreInfoView> {
),
),
if(widget.storeInfo?.tel?.isNotEmpty ?? false)
GestureDetector(
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
showCallMobile();
},
child: Container(
padding:EdgeInsets.only(left: 16.w,right: 8.w,bottom: 16.h) ,
padding:EdgeInsets.only(left: 16.w,right: 8.w,bottom: 8.h) ,
child: Image.asset(
"assets/image/icon_union_call.webp",
width: 24,
@ -230,7 +231,7 @@ class _StoreInfoView extends State<StoreInfoView> {
width: double.infinity,
height: 1,
color: Color(0xFFF4F5F2),
)
),
],
),
);

3
lib/union/union_page.dart

@ -223,7 +223,6 @@ class UnionPageState extends State<UnionPage>
Container(
child: Column(
children: [
45.d,
Row(
children: [
Padding(
@ -272,6 +271,8 @@ class UnionPageState extends State<UnionPage>
controller: tabController,
isScrollable: true,
//
dividerHeight: 0,
dividerColor: Colors.transparent,
indicatorColor: Colors.white,
labelColor: Colors.white,
labelStyle: TextStyle(

18
lib/utils/bridge.dart

@ -1,18 +0,0 @@
import 'package:flutter/services.dart';
class Bridge {
static const MethodChannel _channel1 = const MethodChannel('bridge');
static Future<String> getStartIntent() async {
return await _channel1.invokeMethod('action');
}
static Future<String> toAppStore() async {
return await _channel1.invokeMethod('toAppStore');
}
}

4
lib/view_widget/activity_poster.dart

@ -10,7 +10,7 @@ import 'new_people_reward.dart';
class ActivityPoster extends StatefulWidget {
final ActivityPos? activityPos;
final List<FirstLoginCouponList> firstLoginCouponList;
final List<FirstLoginCouponList>? firstLoginCouponList;
ActivityPoster(this.activityPos, this.firstLoginCouponList);
@ -26,7 +26,7 @@ class _ActivityPoster extends State<ActivityPoster> {
@override
void initState() {
super.initState();
if (widget.firstLoginCouponList.length > 0) showNew = true;
if ((widget.firstLoginCouponList?.length ?? 0) > 0) showNew = true;
}
@override

2
lib/view_widget/badge_attainment_dialog.dart

@ -19,7 +19,7 @@ class _BadgeAttainmentDialog extends State<BadgeAttainmentDialog> {
return Scaffold(
backgroundColor:Colors.transparent,
appBar: MyAppBar(
title:"",
title: "",
titleColor: Colors.white,
leadingColor: Colors.white,
background: Colors.transparent,

3
lib/view_widget/my_appbar.dart

@ -28,7 +28,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
this.bottom,
this.titleChild,
this.title,
this.toolbarHeight = kToolbarHeight + 38,
this.toolbarHeight = kToolbarHeight,
this.background = const Color(0xFFF7F7F7),
this.leadingColor = Colors.black,
this.titleColor = Colors.black,
@ -59,6 +59,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
return AppBar(
backgroundColor: background,
elevation: 0,
scrolledUnderElevation: 0,
systemOverlayStyle: systemUiOverlayStyle,
leading: leading
? GestureDetector(

546
pubspec.lock

File diff suppressed because it is too large Load Diff

7
pubspec.yaml

@ -21,7 +21,7 @@ fluwx:
ignore_security: true # Set to true to disable security seetings.
tobias:
url_scheme: ""
url_scheme: "http://huixiang.com"
ios:
ignore_security: true
no_utdid: true
@ -29,8 +29,9 @@ tobias:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
flutter_localization: ^0.2.0
fluwx: ^4.5.0
get: ^4.6.6
tobias: ^3.3.1
@ -83,7 +84,7 @@ dependencies:
event_bus_plus: ^0.6.2
intl: ^0.18.1
shared_preferences: ^2.0.6
shared_preferences: ^2.0.20
flutter_smart_dialog: ^3.0.6
barcode_widget: ^2.0.4

Loading…
Cancel
Save