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. 132
      android/app/build.gradle
  5. 61
      android/app/proguard-rules.pro
  6. 9
      android/app/src/debug/AndroidManifest.xml
  7. 72
      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. 22
      lib/home/home_page.dart
  41. 2
      lib/home/main_home_page.dart
  42. 8
      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. 14
      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. 219
      lib/store/store_order.dart
  54. 9
      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. 3
      lib/view_widget/my_appbar.dart
  59. 546
      pubspec.lock
  60. 7
      pubspec.yaml

30
.metadata

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

2
android/.gitignore vendored

@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore. # Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties 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"
}
}
]
}

132
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 localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties') def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) { 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') def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) { if (flutterVersionCode == null) {
flutterVersionCode = '1' flutterVersionCode = '1'
@ -21,67 +23,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0' 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 = [ def mfph = [
//宿 //宿
"apk.applicationId" : "com.zsw.huixiang", "apk.applicationId" : "com.zsw.huixiang",
@ -90,23 +31,28 @@ def mfph = [
] ]
android { android {
compileSdkVersion 33 namespace "com.zsw.huixiang"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
sourceSets { compileOptions {
main.java.srcDirs += 'src/main/kotlin' sourceCompatibility JavaVersion.VERSION_1_8
main{ targetCompatibility JavaVersion.VERSION_1_8
jniLibs.srcDirs = ['libs']
} }
kotlinOptions {
jvmTarget = '1.8'
} }
lintOptions { sourceSets {
checkReleaseBuilds false main.java.srcDirs += 'src/main/kotlin'
} }
defaultConfig { defaultConfig {
applicationId "com.zsw.huixiang" applicationId "com.zsw.huixiang"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 34
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
@ -130,7 +76,6 @@ android {
v1SigningEnabled true //v1 v1SigningEnabled true //v1
v2SigningEnabled true //v2 v2SigningEnabled true //v2
} }
} }
buildTypes { 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 { flutter {
source '../..' source '../..'
} }
dependencies { 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'
}

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

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

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:tools="http://schemas.android.com/tools"
package="com.zsw.huixiang"> 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.FOREGROUND_SERVICE"/>
@ -34,13 +34,15 @@
<package android:name="com.tencent.mm" /> <package android:name="com.tencent.mm" />
</queries> </queries>
<application <application
android:label="海峡姐妹" android:label="海峡姐妹"
android:name=".HxApplication" android:name="android.app.Application"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:launchMode="singleTask" android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
@ -48,12 +50,12 @@
<meta-data <meta-data
android:name="io.flutter.embedding.android.NormalTheme" android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" /> android:resource="@style/NormalTheme" />
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"/>
<meta-data <meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame" android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" /> android:value="true" />
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"/>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
@ -71,54 +73,15 @@
<meta-data <meta-data
android:name="XG_SERVER_SUFFIX" android:name="XG_SERVER_SUFFIX"
android:value="tpns.sh.tencent.com" /> 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 <meta-data
android:name=".wxapi.WXPayEntryActivity" android:name="flutterEmbedding"
android:exported="true" android:value="2" />
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>
<activity <activity
android:name="com.yalantis.ucrop.UCropActivity" android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"/> android:screenOrientation="portrait"/>
<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>
<service android:name="com.amap.api.location.APSService"/> <service android:name="com.amap.api.location.APSService"/>
<meta-data <meta-data
android:name="dcloud_appkey" android:name="dcloud_appkey"
@ -131,9 +94,12 @@
android:name="com.baidu.lbsapi.API_KEY" android:name="com.baidu.lbsapi.API_KEY"
android:value="cdM5EPFACARrrHRjCwUEoYuzIlfFWdYP" /> android:value="cdM5EPFACARrrHRjCwUEoYuzIlfFWdYP" />
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application> </application>
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest> </manifest>

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

@ -1,10 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="com.zsw.huixiang"> <!-- The INTERNET permission is required for development. Specifically,
<!-- Flutter needs it to communicate with the running application the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. 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"/> <uses-permission android:name="android.permission.INTERNET"/>
</manifest> </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 { allprojects {
repositories { repositories {
maven { maven {
@ -42,23 +6,17 @@ allprojects {
maven { maven {
url 'https://maven.aliyun.com/repository/jcenter' 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://www.jitpack.io" }
maven { url 'https://developer.huawei.com/repo/'}
maven { url 'https://repo1.maven.org/maven2/' } maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://developer.huawei.com/repo/' }
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }

5
android/gradle.properties

@ -1,6 +1,3 @@
#org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx4G
org.gradle.jvmargs=-Xmx4096m
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=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 distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-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

31
android/settings.gradle

@ -1,11 +1,26 @@
include ':app' pluginManagement {
def flutterSdkPath = {
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties() def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk") def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
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 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huixiang/utils/bridge.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
abstract class BaseState<T extends StatefulWidget> extends State<T> abstract class BaseState<T extends StatefulWidget> extends State<T>
@ -40,15 +39,15 @@ abstract class BaseState<T extends StatefulWidget> extends State<T>
} }
pushRoute() async { pushRoute() async {
String startIntent = await Bridge.getStartIntent(); // String startIntent = await Bridge.getStartIntent();
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
print("intent:$startIntent"); // print("intent:$startIntent");
String pushData = ""; String pushData = "";
if (startIntent != "") { // if (startIntent != "") {
pushData = startIntent; // pushData = startIntent;
} else { // } else {
pushData = sharedPreferences.getString("pushData") ?? ""; // pushData = sharedPreferences.getString("pushData") ?? "";
} // }
if (pushData == "") return; if (pushData == "") return;
Map<String, dynamic> pushMap = jsonDecode(pushData); Map<String, dynamic> pushMap = jsonDecode(pushData);
String routeName = ""; String routeName = "";

10
lib/community/community_child_page.dart

@ -1,5 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/community/community_view/community_dynamic.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:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../utils/flutter_utils.dart'; import '../utils/flutter_utils.dart';
import '../utils/font_weight.dart'; import '../utils/font_weight.dart';
@ -72,6 +74,14 @@ class CommunityChildPageState extends State<CommunityChildPage>
return; return;
} }
isLoadingData = true; 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) { if (isLoadMore) {
pageNum += 1; pageNum += 1;
isLoadMore = false; 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/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.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:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_footer.dart';
import 'package:pull_to_refresh/pull_to_refresh.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_list_view.dart';
import 'community_view/class_title_tab.dart'; import 'community_view/class_title_tab.dart';
import 'community_view/course_banner.dart'; import 'community_view/course_banner.dart';
@ -60,6 +62,14 @@ class _CommunityCourse extends State<CommunityCourse>
///banner ///banner
queryCourseBanner() async { 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({ BaseData<PageInfo<BannerData>>? baseData = await apiService?.queryBanner({
"model": {"type": "COURSE_BANNER"}, "model": {"type": "COURSE_BANNER"},
}).catchError((onError) { }).catchError((onError) {

1
lib/community/community_details.dart

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

3
lib/community/community_page.dart

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

2
lib/community/new_community_details.dart

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

2
lib/community/order_page.dart

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

22
lib/home/home_page.dart

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

2
lib/home/main_home_page.dart

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

8
lib/main.dart

@ -165,11 +165,7 @@ class MyApp extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MediaQuery( return ScreenUtilInit(
data: const MediaQueryData(
size: Size(375, 812),
),
child: ScreenUtilInit(
designSize: Size(375, 812), designSize: Size(375, 812),
builder: (BuildContext context, Widget? child,) => GetMaterialApp( builder: (BuildContext context, Widget? child,) => GetMaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
@ -251,7 +247,7 @@ class MyApp extends StatelessWidget {
); );
}, },
), ),
)); );
} }
} }

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

1
lib/mine/mine_view/community_follow.dart

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

3
lib/mine/mine_view/mine_item.dart

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

1
lib/mine/mine_wallet_page.dart

@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/data/base_data.dart';
import 'package:huixiang/data/page.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'; 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/";/// // 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._dio, {
this.baseUrl, this.baseUrl,
}) { }) {
baseUrl ??= 'http://192.168.10.78:8765/app/'; baseUrl ??= 'http://192.168.10.54:8765/app/';
} }
final Dio _dio; final Dio _dio;

14
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.dart';
import 'package:huixiang/data/vip_card_home.dart'; import 'package:huixiang/data/vip_card_home.dart';
import 'package:huixiang/data/vip_rule_details.dart'; import 'package:huixiang/data/vip_rule_details.dart';
// import 'package:gbk2utf8/gbk2utf8.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/data/activity.dart'; import 'package:huixiang/data/activity.dart';
import 'package:huixiang/data/article.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/comunity_comment.dart';
import 'package:huixiang/data/coupon.dart'; import 'package:huixiang/data/coupon.dart';
import 'package:huixiang/data/farmers.dart'; import 'package:huixiang/data/farmers.dart';
import 'package:huixiang/data/order_info.dart'; import 'package:huixiang/data/order_info.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:retrofit/retrofit.dart'; import 'package:retrofit/retrofit.dart';
import 'package:huixiang/login/captcha/click_word_captcha.dart';
import '../login/captcha/click_word_captcha.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
@ -99,6 +95,7 @@ abstract class ApiService {
headers: headers, headers: headers,
responseType: ResponseType.json, responseType: ResponseType.json,
); );
if (dio.interceptors.length <= 1) {
dio.interceptors.add( dio.interceptors.add(
InterceptorsWrapper(onRequest: (RequestOptions options, RequestInterceptorHandler handler,) { InterceptorsWrapper(onRequest: (RequestOptions options, RequestInterceptorHandler handler,) {
try { try {
@ -129,6 +126,7 @@ abstract class ApiService {
} }
debugPrint("code = ${response.statusCode}"); debugPrint("code = ${response.statusCode}");
p(jsonEncode(response.data)); p(jsonEncode(response.data));
if (response.data is Map) {
Map map = response.data; Map map = response.data;
if (map["code"] == 40005 || map["code"] == 40001) { if (map["code"] == 40005 || map["code"] == 40001) {
if (!LoginTipsDialog().isShow) { if (!LoginTipsDialog().isShow) {
@ -139,6 +137,7 @@ abstract class ApiService {
debugPrint("======================= 响应数据结束 =======================\n"); debugPrint("======================= 响应数据结束 =======================\n");
if(map["code"] == 0 || map["code"] == 200) { if(map["code"] == 0 || map["code"] == 200) {
} }
}
handler.next(response); handler.next(response);
} catch (e2) { } catch (e2) {
print("respon: ${e2}"); print("respon: ${e2}");
@ -154,6 +153,8 @@ abstract class ApiService {
handler.next(e); handler.next(e);
}), }),
); );
}
return _ApiService(dio, baseUrl: baseUrl); return _ApiService(dio, baseUrl: baseUrl);
} }
@ -314,8 +315,7 @@ abstract class ApiService {
///banner查询 ///banner查询
@POST("/banner/page") @POST("/banner/page")
Future<BaseData<PageInfo<BannerData>>> queryBanner( Future<BaseData<PageInfo<BannerData>>> queryBanner(@Body() Map<String, dynamic> param);
@Body() Map<String, dynamic> param);
/// ///
@GET("/home/brand") @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/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/bridge.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
@ -44,7 +43,11 @@ class _AboutPage extends State<AboutPage> {
Container( Container(
decoration: new BoxDecoration( decoration: new BoxDecoration(
border: Border( border: Border(
bottom: BorderSide(color: Color(0xffF7F7F7), width: 0.0)), bottom: BorderSide(
color: Color(0xffF7F7F7),
width: 0.0,
),
),
color: Color(0xffF7F7F7), color: Color(0xffF7F7F7),
), ),
padding: EdgeInsets.only(top: 25), padding: EdgeInsets.only(top: 25),
@ -54,7 +57,7 @@ class _AboutPage extends State<AboutPage> {
child:Column( child:Column(
children: [ children: [
Image.asset( Image.asset(
"assets/image/icon_about_logo.png", "assets/image/icon_about_logo.webp",
width: 130, width: 130,
height: 130, height: 130,
), ),
@ -93,12 +96,12 @@ class _AboutPage extends State<AboutPage> {
GestureDetector( GestureDetector(
child: settingSingleItem(S.of(context).geiwopingfen), child: settingSingleItem(S.of(context).geiwopingfen),
onTap: () { onTap: () {
Bridge.toAppStore().then((value) { // Bridge.toAppStore().then((value) {
if (Platform.isAndroid && value == "0") { // if (Platform.isAndroid && value == "0") {
SmartDialog.showToast("手机没有安装应用市场app", // SmartDialog.showToast("手机没有安装应用市场app",
alignment: Alignment.center); // alignment: Alignment.center);
} // }
}); // });
}, },
), ),
GestureDetector( GestureDetector(
@ -217,7 +220,8 @@ class _AboutPage extends State<AboutPage> {
size: 24, 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 @override
void initState() { void initState() {
super.initState(); super.initState();
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); // 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"));
} }
@override @override
@ -59,12 +38,52 @@ class _TreatyPage extends State<TreatyPage> {
Container( Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
alignment: Alignment.center, alignment: Alignment.center, //TreatyPage
child: child: FutureBuilder(
WebViewWidget( future: loadWeb(),
controller: _webViewController, 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 { queryStoreInfo() async {
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black);
SharedPreferences value = await SharedPreferences.getInstance(); 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) { BaseData? baseData = await apiService?.queryStoreInfo(storeId).catchError((error) {
debugPrint(error); debugPrint(error);
}); });

219
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_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:flutter_swiper_view/flutter_swiper_view.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/data/member_vo.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/data/activity.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/shop_car.dart';
import 'package:huixiang/store/store_view/store_info.dart'; import 'package:huixiang/store/store_view/store_info.dart';
import 'package:huixiang/store/store_view/store_order_list.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/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
@ -80,6 +82,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
tenant = widget.arguments?["tenant"]; tenant = widget.arguments?["tenant"];
storeId = widget.arguments?["id"]; storeId = widget.arguments?["id"];
tabcontroller = TabController(length: 1, vsync: this);
debugPrint( debugPrint(
"store_param tableId:$tableId tenant:$tenant storeId:$storeId"); "store_param tableId:$tableId tenant:$tenant storeId:$storeId");
@ -190,7 +194,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
storeInfo = StoreInfo.fromJson(baseData!.data); 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) { if (mounted) {
setState(() {}); setState(() {});
} }
@ -222,44 +228,23 @@ class _StoreOrderPage extends State<StoreOrderPage>
controller: controller, controller: controller,
dragStartBehavior: DragStartBehavior.start, dragStartBehavior: DragStartBehavior.start,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
headerSliverBuilder: headerSliverBuilder: (BuildContext context, bool innerScrolled) {
(BuildContext context, bool innerScrolled) {
return [ return [
SliverOverlapAbsorber( SliverOverlapAbsorber(
handle: handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
NestedScrollView.sliverOverlapAbsorberHandleFor(
context),
sliver: SliverAppBar( sliver: SliverAppBar(
expandedHeight: (storeInfo?.couponVOList != null) expandedHeight: (storeInfo?.couponVOList?.isNotEmpty ?? true) ? 440.h : 395.h,
? 400.h
: 395.h,
floating: false, floating: false,
snap: false, snap: false,
pinned: true, pinned: true,
leading: null,
stretch: false, stretch: false,
toolbarHeight: Get.statusBarHeight,
systemOverlayStyle: SystemUiOverlayStyle.light, 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,
),
),
),
flexibleSpace: FlexibleSpaceBar( flexibleSpace: FlexibleSpaceBar(
title: Title(controller, title: Title(
storeInfo!.storeName ?? '', controller,
storeInfo?.storeName ?? '',
(alpha) { (alpha) {
setState(() { setState(() {
if (alpha == 1) if (alpha == 1)
@ -268,7 +253,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
scrollPhysics = scrollPhysics =
NeverScrollableScrollPhysics(); NeverScrollableScrollPhysics();
}); });
}), },
),
collapseMode: CollapseMode.pin, collapseMode: CollapseMode.pin,
stretchModes: [ stretchModes: [
StretchMode.zoomBackground, StretchMode.zoomBackground,
@ -303,14 +289,11 @@ class _StoreOrderPage extends State<StoreOrderPage>
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: borderRadius: BorderRadius.circular(8.w),
BorderRadius.circular(8.w),
), ),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
/// ///
StoreInfoView( StoreInfoView(
@ -357,6 +340,25 @@ class _StoreOrderPage extends State<StoreOrderPage>
left: 0, left: 0,
right: 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,
),
),
),
)
], ],
), ),
), ),
@ -364,53 +366,88 @@ class _StoreOrderPage extends State<StoreOrderPage>
backgroundColor: Color(0x33FAFAFA), backgroundColor: Color(0x33FAFAFA),
centerTitle: false, centerTitle: false,
elevation: 0, elevation: 0,
leadingWidth: 0,
automaticallyImplyLeading: false,
bottom: PreferredSize( bottom: PreferredSize(
preferredSize: Size( preferredSize: Size(
MediaQuery.of(context).size.width, Get.width,
38.h, 38.h,
), ),
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 10.w), width: Get.width,
width: MediaQuery.of(context).size.width,
child: Theme( child: Theme(
data: ThemeData( data: ThemeData(
splashColor: Colors.transparent, splashColor: Colors.transparent,
// //
highlightColor: highlightColor: Colors.transparent, //
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, child: Row(
unselectedLabelStyle: TextStyle( children: [
fontSize: 15.sp, 20.vd,
fontWeight: FontWeight.w400, Column(
), children: [
labelStyle: TextStyle( Text( // Color(0xFF32A060),
S.of(context).diandan,
style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 18.sp, fontSize: 18.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
labelColor: Colors.black, ),
tabs: [ 5.d,
MyTab(text: S.of(context).diandan), Container(
// MyTab(text: ""), width: 20,
height: 3,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
color: Color(0xFF32A060),
),
),
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(),
], ],
)), ),
),
), ),
), ),
), ),
), ),
]; ];
}, },
/// ///
body: TabBarView( body: TabBarView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
@ -441,18 +478,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
controller: tabcontroller, controller: tabcontroller,
), ),
), ),
/*SmartRefresher(
controller: refreshController =
RefreshController(initialRefresh: false),
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
physics: BouncingScrollPhysics(),
onRefresh: () {
queryStoreInfo();
},
child:
),*/
), ),
Positioned( Positioned(
bottom: 30, bottom: 30,
@ -836,8 +861,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
// EasyLoading.dismiss(); // EasyLoading.dismiss();
if (baseDate?.isSuccess ?? false) { if (baseDate?.isSuccess ?? false) {
this.shopCarGoods = await queryShopCar(); this.shopCarGoods = await queryShopCar();
if (miniDetail?.subscribeParam?.isEnableSubscribe ?? false) if (miniDetail?.subscribeParam?.isEnableSubscribe ?? false) toDownOrder();
toDownOrder();
setState(() {}); setState(() {});
} else { } else {
SmartDialog.showToast("${baseDate?.msg}", alignment: Alignment.center); SmartDialog.showToast("${baseDate?.msg}", alignment: Alignment.center);
@ -853,7 +877,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
if (storeInfo?.posType?.code == "NORMALSTORE" && tableId == 0) { if (storeInfo?.posType?.code == "NORMALSTORE" && tableId == 0) {
return null; 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?.isSuccess ?? false) && (baseDate!.data?.length ?? 0) > 0) {
if (baseDate.data![0].selectDiscount == 1) { if (baseDate.data![0].selectDiscount == 1) {
baseDate.data![0].couponList?.forEach((element) { baseDate.data![0].couponList?.forEach((element) {
@ -881,7 +906,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
Map<String, dynamic> shopCarTemp = shopCarGoods?.toJson() ?? {}; Map<String, dynamic> shopCarTemp = shopCarGoods?.toJson() ?? {};
cartSkuItem.buyNum = (cartSkuItem.buyNum ?? 0) + 1; cartSkuItem.buyNum = (cartSkuItem.buyNum ?? 0) + 1;
shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()];
BaseData<List<ShoppingCart>>? baseDate = await minService?.shoppingCartSingle(shopCarTemp); BaseData<List<ShoppingCart>>? baseDate =
await minService?.shoppingCartSingle(shopCarTemp);
if (baseDate?.isSuccess ?? false) { if (baseDate?.isSuccess ?? false) {
this.shopCarGoods = await queryShopCar(); this.shopCarGoods = await queryShopCar();
shopCartKey.currentState?.setState(() {}); shopCartKey.currentState?.setState(() {});
@ -895,7 +921,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
Map<String, dynamic> shopCarTemp = shopCarGoods?.toJson() ?? {}; Map<String, dynamic> shopCarTemp = shopCarGoods?.toJson() ?? {};
cartSkuItem.buyNum = (cartSkuItem.buyNum ?? 0) - 1; cartSkuItem.buyNum = (cartSkuItem.buyNum ?? 0) - 1;
shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()];
BaseData<List<ShoppingCart>>? baseDate = await minService?.shoppingCartSingle(shopCarTemp); BaseData<List<ShoppingCart>>? baseDate =
await minService?.shoppingCartSingle(shopCarTemp);
if (baseDate?.isSuccess ?? false) { if (baseDate?.isSuccess ?? false) {
EasyLoading.dismiss(); EasyLoading.dismiss();
this.shopCarGoods = await queryShopCar(); this.shopCarGoods = await queryShopCar();
@ -909,25 +936,31 @@ class _StoreOrderPage extends State<StoreOrderPage>
///1 ///1
add(MiniDetail miniDetail, selectSkus) async { add(MiniDetail miniDetail, selectSkus) async {
ProductSkuVOList? productSku = miniDetail.productSkuVOList?.firstWhere((element) { ProductSkuVOList? productSku =
miniDetail.productSkuVOList?.firstWhere((element) {
return skuY(element, selectSkus); return skuY(element, selectSkus);
}); });
String? skuId = productSku?.id; 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(); Map<String, dynamic>? shopCarTemp = shopCarGoods?.toJson();
shopCarGoods?.tableId = "$tableId"; shopCarGoods?.tableId = "$tableId";
if (shopSkuIndex >= 0) { if (shopSkuIndex >= 0) {
int buy = shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum ?? 0; int buy =
shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum ?? 0;
shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum = (buy + 1); 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()]; shopCarTemp?["shoppingCartSkuItemList"] = [cartSkuItem?.toJson()];
} else { } else {
await _addShopCar(miniDetail, selectSkus, 1); await _addShopCar(miniDetail, selectSkus, 1);
return; return;
} }
BaseData<List<ShoppingCart>>? baseDate = await minService?.shoppingCartSingle(shopCarTemp ?? {}); BaseData<List<ShoppingCart>>? baseDate =
await minService?.shoppingCartSingle(shopCarTemp ?? {});
if (baseDate?.isSuccess ?? false) { if (baseDate?.isSuccess ?? false) {
this.shopCarGoods = await queryShopCar(); this.shopCarGoods = await queryShopCar();
debugPrint("count.toString()"); debugPrint("count.toString()");
@ -944,20 +977,26 @@ class _StoreOrderPage extends State<StoreOrderPage>
return skuY(element, selectSkus); return skuY(element, selectSkus);
}); });
String? skuId = productSku?.id; String? skuId = productSku?.id;
SkuItemList? shopSkuItem = shopCarGoods?.shoppingCartSkuItemList?.firstWhere((element) => skuId == element.id); SkuItemList? shopSkuItem = shopCarGoods?.shoppingCartSkuItemList
int shopSkuIndex = shopCarGoods?.shoppingCartSkuItemList?.indexWhere((element) => skuId == element.id) ?? -1; ?.firstWhere((element) => skuId == element.id);
int shopSkuIndex = shopCarGoods?.shoppingCartSkuItemList
?.indexWhere((element) => skuId == element.id) ??
-1;
if ((shopSkuItem?.buyNum ?? 0) > 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?.shoppingCartSkuItemList?[shopSkuIndex].buyNum = butNum - 1;
} }
shopCarGoods?.tableId = "$tableId"; shopCarGoods?.tableId = "$tableId";
Map<String, dynamic>? shopCarTemp = shopCarGoods?.toJson(); 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()]; shopCarTemp?["shoppingCartSkuItemList"] = [cartSkuItem?.toJson()];
BaseData<List<ShoppingCart>>? baseDate = await minService?.shoppingCartSingle(shopCarTemp ?? {}); BaseData<List<ShoppingCart>>? baseDate =
await minService?.shoppingCartSingle(shopCarTemp ?? {});
if (baseDate?.isSuccess ?? false) { if (baseDate?.isSuccess ?? false) {
queryShopCar().then((value) { queryShopCar().then((value) {
this.shopCarGoods = value; this.shopCarGoods = value;

9
lib/store/store_view/store_info.dart

@ -173,7 +173,7 @@ class _StoreInfoView extends State<StoreInfoView> {
}, },
child: Container( child: Container(
color: Colors.transparent, color: Colors.transparent,
padding:EdgeInsets.only(right: 8.w,bottom: 16.h) , padding:EdgeInsets.only(right: 8.w,bottom: 8.h) ,
child: Image.asset( child: Image.asset(
"assets/image/icon_union_location.webp", "assets/image/icon_union_location.webp",
width: 20, 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( child: Text(
"${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo!.address : ""}", "${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo!.address : ""}",
maxLines: 2, maxLines: 2,
@ -216,7 +217,7 @@ class _StoreInfoView extends State<StoreInfoView> {
showCallMobile(); showCallMobile();
}, },
child: Container( 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( child: Image.asset(
"assets/image/icon_union_call.webp", "assets/image/icon_union_call.webp",
width: 24, width: 24,
@ -230,7 +231,7 @@ class _StoreInfoView extends State<StoreInfoView> {
width: double.infinity, width: double.infinity,
height: 1, height: 1,
color: Color(0xFFF4F5F2), color: Color(0xFFF4F5F2),
) ),
], ],
), ),
); );

3
lib/union/union_page.dart

@ -223,7 +223,6 @@ class UnionPageState extends State<UnionPage>
Container( Container(
child: Column( child: Column(
children: [ children: [
45.d,
Row( Row(
children: [ children: [
Padding( Padding(
@ -272,6 +271,8 @@ class UnionPageState extends State<UnionPage>
controller: tabController, controller: tabController,
isScrollable: true, isScrollable: true,
// //
dividerHeight: 0,
dividerColor: Colors.transparent,
indicatorColor: Colors.white, indicatorColor: Colors.white,
labelColor: Colors.white, labelColor: Colors.white,
labelStyle: TextStyle( 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 { class ActivityPoster extends StatefulWidget {
final ActivityPos? activityPos; final ActivityPos? activityPos;
final List<FirstLoginCouponList> firstLoginCouponList; final List<FirstLoginCouponList>? firstLoginCouponList;
ActivityPoster(this.activityPos, this.firstLoginCouponList); ActivityPoster(this.activityPos, this.firstLoginCouponList);
@ -26,7 +26,7 @@ class _ActivityPoster extends State<ActivityPoster> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
if (widget.firstLoginCouponList.length > 0) showNew = true; if ((widget.firstLoginCouponList?.length ?? 0) > 0) showNew = true;
} }
@override @override

3
lib/view_widget/my_appbar.dart

@ -28,7 +28,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
this.bottom, this.bottom,
this.titleChild, this.titleChild,
this.title, this.title,
this.toolbarHeight = kToolbarHeight + 38, this.toolbarHeight = kToolbarHeight,
this.background = const Color(0xFFF7F7F7), this.background = const Color(0xFFF7F7F7),
this.leadingColor = Colors.black, this.leadingColor = Colors.black,
this.titleColor = Colors.black, this.titleColor = Colors.black,
@ -59,6 +59,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
return AppBar( return AppBar(
backgroundColor: background, backgroundColor: background,
elevation: 0, elevation: 0,
scrolledUnderElevation: 0,
systemOverlayStyle: systemUiOverlayStyle, systemOverlayStyle: systemUiOverlayStyle,
leading: leading leading: leading
? GestureDetector( ? 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. ignore_security: true # Set to true to disable security seetings.
tobias: tobias:
url_scheme: "" url_scheme: "http://huixiang.com"
ios: ios:
ignore_security: true ignore_security: true
no_utdid: true no_utdid: true
@ -29,8 +29,9 @@ tobias:
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
flutter_localizations:
sdk: flutter
flutter_localization: ^0.2.0
fluwx: ^4.5.0 fluwx: ^4.5.0
get: ^4.6.6 get: ^4.6.6
tobias: ^3.3.1 tobias: ^3.3.1
@ -83,7 +84,7 @@ dependencies:
event_bus_plus: ^0.6.2 event_bus_plus: ^0.6.2
intl: ^0.18.1 intl: ^0.18.1
shared_preferences: ^2.0.6 shared_preferences: ^2.0.20
flutter_smart_dialog: ^3.0.6 flutter_smart_dialog: ^3.0.6
barcode_widget: ^2.0.4 barcode_widget: ^2.0.4

Loading…
Cancel
Save