圈子相关点击滑动到顶部 还有bug修改
This commit is contained in:
parent
28e9f4b29b
commit
dff55ab48f
96
circle_app/android/app/agconnect-services.json
Normal file
96
circle_app/android/app/agconnect-services.json
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"agcgw":{
|
||||||
|
"backurl":"connect-drcn.hispace.hicloud.com",
|
||||||
|
"url":"connect-drcn.dbankcloud.cn",
|
||||||
|
"websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com",
|
||||||
|
"websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn"
|
||||||
|
},
|
||||||
|
"agcgw_all":{
|
||||||
|
"CN":"connect-drcn.dbankcloud.cn",
|
||||||
|
"CN_back":"connect-drcn.hispace.hicloud.com",
|
||||||
|
"DE":"connect-dre.dbankcloud.cn",
|
||||||
|
"DE_back":"connect-dre.hispace.hicloud.com",
|
||||||
|
"RU":"connect-drru.hispace.dbankcloud.ru",
|
||||||
|
"RU_back":"connect-drru.hispace.dbankcloud.cn",
|
||||||
|
"SG":"connect-dra.dbankcloud.cn",
|
||||||
|
"SG_back":"connect-dra.hispace.hicloud.com"
|
||||||
|
},
|
||||||
|
"websocketgw_all":{
|
||||||
|
"CN":"connect-ws-drcn.hispace.dbankcloud.cn",
|
||||||
|
"CN_back":"connect-ws-drcn.hispace.dbankcloud.com",
|
||||||
|
"DE":"connect-ws-dre.hispace.dbankcloud.cn",
|
||||||
|
"DE_back":"connect-ws-dre.hispace.dbankcloud.com",
|
||||||
|
"RU":"connect-ws-drru.hispace.dbankcloud.ru",
|
||||||
|
"RU_back":"connect-ws-drru.hispace.dbankcloud.cn",
|
||||||
|
"SG":"connect-ws-dra.hispace.dbankcloud.cn",
|
||||||
|
"SG_back":"connect-ws-dra.hispace.dbankcloud.com"
|
||||||
|
},
|
||||||
|
"client":{
|
||||||
|
"cp_id":"30086000588740851",
|
||||||
|
"product_id":"388421841221621215",
|
||||||
|
"client_id":"1220247869945040704",
|
||||||
|
"client_secret":"6CF6962F20BA3CB6B9636ACF05D7E5EDD012ACA4635A0FB4C9FEFF9CA9AFDDD3",
|
||||||
|
"project_id":"388421841221621215",
|
||||||
|
"app_id":"108937353",
|
||||||
|
"api_key":"DAEDAJgZjHa/eqRm+4a82hc/xGIXjfwMZ7fb3PIBDsjow5BLgA8wvuSI42ntIcLhEKexG5MieEvAOX7cMtz+yCSjLj77CXLkXigVHg==",
|
||||||
|
"package_name":"com.leyuan.app"
|
||||||
|
},
|
||||||
|
"oauth_client":{
|
||||||
|
"client_id":"108937353",
|
||||||
|
"client_type":1
|
||||||
|
},
|
||||||
|
"app_info":{
|
||||||
|
"app_id":"108937353",
|
||||||
|
"package_name":"com.leyuan.app"
|
||||||
|
},
|
||||||
|
"service":{
|
||||||
|
"analytics":{
|
||||||
|
"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
|
||||||
|
"collector_url_ru":"datacollector-drru.dt.dbankcloud.ru,datacollector-drru.dt.hicloud.com",
|
||||||
|
"collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
|
||||||
|
"collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn",
|
||||||
|
"collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
|
||||||
|
"resource_id":"p1",
|
||||||
|
"channel_id":""
|
||||||
|
},
|
||||||
|
"edukit":{
|
||||||
|
"edu_url":"edukit.edu.cloud.huawei.com.cn",
|
||||||
|
"dh_url":"edukit.edu.cloud.huawei.com.cn"
|
||||||
|
},
|
||||||
|
"search":{
|
||||||
|
"url":"https://search-drcn.cloud.huawei.com"
|
||||||
|
},
|
||||||
|
"cloudstorage":{
|
||||||
|
"storage_url_sg_back":"https://agc-storage-dra.cloud.huawei.asia",
|
||||||
|
"storage_url_ru_back":"https://agc-storage-drru.cloud.huawei.ru",
|
||||||
|
"storage_url_ru":"https://agc-storage-drru.cloud.huawei.ru",
|
||||||
|
"storage_url_de_back":"https://agc-storage-dre.cloud.huawei.eu",
|
||||||
|
"storage_url_de":"https://ops-dre.agcstorage.link",
|
||||||
|
"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn",
|
||||||
|
"storage_url_sg":"https://ops-dra.agcstorage.link",
|
||||||
|
"storage_url_cn_back":"https://agc-storage-drcn.cloud.huawei.com.cn",
|
||||||
|
"storage_url_cn":"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.leyuan.app",
|
||||||
|
"client":{
|
||||||
|
"app_id":"108937353"
|
||||||
|
},
|
||||||
|
"app_info":{
|
||||||
|
"package_name":"com.leyuan.app",
|
||||||
|
"app_id":"108937353"
|
||||||
|
},
|
||||||
|
"oauth_client":{
|
||||||
|
"client_type":1,
|
||||||
|
"client_id":"108937353"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -24,6 +24,7 @@ if (flutterVersionName == null) {
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
apply plugin: 'com.huawei.agconnect'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion flutter.compileSdkVersion
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
@ -66,6 +67,11 @@ android {
|
|||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
|
manifestPlaceholders = [
|
||||||
|
vivo_APPID: "105669716",
|
||||||
|
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||||
|
]
|
||||||
|
|
||||||
// ndk {
|
// ndk {
|
||||||
// abiFilters 'armeabi-v7a', 'arm64-v8a'
|
// abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||||
// ldLibs "log"
|
// ldLibs "log"
|
||||||
@ -77,10 +83,11 @@ android {
|
|||||||
// TODO: Add your own signing config for the release build.
|
// TODO: Add your own signing config for the release build.
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
//flutter build apk --no-sound-null-safety
|
//flutter build apk --no-sound-null-safety
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.release
|
||||||
project.ext.enableFlutterNullSafety = false
|
project.ext.enableFlutterNullSafety = false
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
|
signingConfig signingConfigs.release
|
||||||
project.ext.enableFlutterNullSafety = false
|
project.ext.enableFlutterNullSafety = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,10 +26,41 @@
|
|||||||
android:name="android.permission.READ_MEDIA_VIDEO"/>
|
android:name="android.permission.READ_MEDIA_VIDEO"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- 这个权限用于访问GPS定位 -->
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- 这个权限用于访问GPS定位 -->
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
|
<uses-permission android:name = "com.huawei.android.launcher.permission.CHANGE_BADGE "/>
|
||||||
|
<uses-permission android:name="com.vivo.notification.permission.BADGE_ICON" />
|
||||||
|
<uses-permission android:name = "com.hihonor.android.launcher.permission.CHANGE_BADGE" />
|
||||||
|
|
||||||
|
|
||||||
|
<!--小米 开始-->
|
||||||
|
<permission
|
||||||
|
android:name="com.leyuan.app.permission.MIPUSH_RECEIVE"
|
||||||
|
android:protectionLevel="signature" />
|
||||||
|
<uses-permission android:name="com.leyuan.app.permission.MIPUSH_RECEIVE" />
|
||||||
|
<!--小米 结束-->
|
||||||
|
|
||||||
|
<!--OPPO 开始-->
|
||||||
|
<uses-permission android:name="com.coloros.mcs.permission.RECIEVE_MCS_MESSAGE" />
|
||||||
|
<uses-permission android:name="com.heytap.mcs.permission.RECIEVE_MCS_MESSAGE" />
|
||||||
|
<!--OPPO 结束-->
|
||||||
|
|
||||||
|
<!--魅族 开始-->
|
||||||
|
<!-- 可选,用于兼容 Flyme5 且推送服务是旧版本的情况-->
|
||||||
|
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||||
|
<!-- 兼容 Flyme5 的权限配置-->
|
||||||
|
<uses-permission android:name="com.meizu.flyme.push.permission.RECEIVE" />
|
||||||
|
<permission android:name="com.leyuan.app.push.permission.MESSAGE"
|
||||||
|
android:protectionLevel="signature"/>
|
||||||
|
<uses-permission android:name="com.leyuan.app.push.permission.MESSAGE" />
|
||||||
|
<!-- 兼容 Flyme3 的权限配置-->
|
||||||
|
<uses-permission android:name="com.meizu.c2dm.permission.RECEIVE" />
|
||||||
|
<permission android:name="com.leyuan.app.permission.C2D_MESSAGE" android:protectionLevel="signature"
|
||||||
|
/>
|
||||||
|
<uses-permission android:name="com.leyuan.app.permission.C2D_MESSAGE"/>
|
||||||
|
<!--魅族 结束-->
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="微乐园"
|
android:label="微乐园"
|
||||||
android:name="${applicationName}"
|
|
||||||
android:icon="@mipmap/ic_launcher">
|
android:icon="@mipmap/ic_launcher">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
@ -39,6 +70,7 @@
|
|||||||
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"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:networkSecurityConfig="@xml/network_security_config"
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:windowSoftInputMode="adjustResize">
|
android:windowSoftInputMode="adjustResize">
|
||||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||||
@ -49,6 +81,13 @@
|
|||||||
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="com.vivo.push.api_key"
|
||||||
|
android:value="84f750207787376b310ca5b0d5969122" />
|
||||||
|
<meta-data
|
||||||
|
android:name="com.vivo.push.app_id"
|
||||||
|
android:value="105669716" />
|
||||||
|
|
||||||
<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"/>
|
||||||
|
|||||||
@ -7,11 +7,14 @@ buildscript {
|
|||||||
maven{url 'https://maven.aliyun.com/repository/google-plugin' }
|
maven{url 'https://maven.aliyun.com/repository/google-plugin' }
|
||||||
maven{url 'https://maven.aliyun.com/repository/public' }
|
maven{url 'https://maven.aliyun.com/repository/public' }
|
||||||
maven{url 'https://maven.aliyun.com/repository/jcenter' }
|
maven{url 'https://maven.aliyun.com/repository/jcenter' }
|
||||||
|
maven {url 'https://developer.huawei.com/repo/'}
|
||||||
|
maven { url 'https://developer.hihonor.com/repo/' }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.2.0'
|
classpath 'com.android.tools.build:gradle:7.2.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,6 +27,8 @@ allprojects {
|
|||||||
maven { url 'https://mvn.getui.com/nexus/content/repositories/releases' }
|
maven { url 'https://mvn.getui.com/nexus/content/repositories/releases' }
|
||||||
maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
|
maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
|
||||||
maven { url 'https://repo1.maven.org/maven2/' }
|
maven { url 'https://repo1.maven.org/maven2/' }
|
||||||
|
maven {url 'https://developer.huawei.com/repo/'}
|
||||||
|
maven { url 'https://developer.hihonor.com/repo/' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 395 KiB |
@ -25,6 +25,7 @@ import '../dialog/UnlockCallDialog.dart';
|
|||||||
import '../select_circle/logic.dart';
|
import '../select_circle/logic.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
import '../../common/config.dart';
|
import '../../common/config.dart';
|
||||||
|
import 'package:image/image.dart' as img;
|
||||||
|
|
||||||
class Call_outLogic extends GetxController {
|
class Call_outLogic extends GetxController {
|
||||||
final Call_outState state = Call_outState();
|
final Call_outState state = Call_outState();
|
||||||
@ -227,12 +228,20 @@ class Call_outLogic extends GetxController {
|
|||||||
showOKToast("最多上传6张图片哦~");
|
showOKToast("最多上传6张图片哦~");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final XFile? pickedFile = await _picker.pickImage(
|
final XFile? pickedFile = await _picker.pickImage(source: ImageSource.gallery,);
|
||||||
source: ImageSource.gallery,
|
|
||||||
);
|
|
||||||
if (null == pickedFile) {
|
if (null == pickedFile) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// final image = img.decodeImage(File(pickedFile.path).readAsBytesSync())!;
|
||||||
|
// img.Image watermarkedImage = img.Image(image.width, image.height);
|
||||||
|
// watermarkedImage = img.copyResize(image, width: image.width, height: image.height);
|
||||||
|
//
|
||||||
|
// // 添加文字水印
|
||||||
|
// img.drawString(watermarkedImage, img.arial_48, 10, 1000, 'Watermark Text', color: img.getColor(255, 0, 0));
|
||||||
|
//
|
||||||
|
// var path = await getApplicationSupportDirectoryPath();
|
||||||
|
// String outputPath = path+"ceshishuiyin";
|
||||||
|
// File(outputPath).writeAsBytesSync(img.encodeJpg(watermarkedImage));
|
||||||
|
|
||||||
SmartDialog.showLoading();
|
SmartDialog.showLoading();
|
||||||
uploadImage(quToken, pickedFile!, CONFIG.CALL_OUT_IMAGE, (result) {
|
uploadImage(quToken, pickedFile!, CONFIG.CALL_OUT_IMAGE, (result) {
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:tencent_chat_push_for_china/tencent_chat_push_for_china.dart';
|
||||||
import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_state.dart';
|
import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_state.dart';
|
||||||
import 'package:tencent_cloud_chat_uikit/business_logic/separate_models/tui_chat_separate_view_model.dart';
|
import 'package:tencent_cloud_chat_uikit/business_logic/separate_models/tui_chat_separate_view_model.dart';
|
||||||
import 'package:tencent_cloud_chat_uikit/business_logic/view_models/tui_chat_global_model.dart';
|
import 'package:tencent_cloud_chat_uikit/business_logic/view_models/tui_chat_global_model.dart';
|
||||||
@ -116,6 +117,8 @@ class _TIMUIKitAppBarState extends TIMUIKitState<TIMUIKitAppBar> {
|
|||||||
String _getTotalUnReadCount(int unreadCount) {
|
String _getTotalUnReadCount(int unreadCount) {
|
||||||
return unreadCount < 99 ? unreadCount.toString() : "99";
|
return unreadCount < 99 ? unreadCount.toString() : "99";
|
||||||
}
|
}
|
||||||
|
final TimUiKitPushPlugin cPush = TimUiKitPushPlugin();
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|||||||
@ -73,7 +73,7 @@ class MinefragmentLogic extends GetxController {
|
|||||||
userInfoBean = bean.data.user;
|
userInfoBean = bean.data.user;
|
||||||
|
|
||||||
if (userInfoBean != null) {
|
if (userInfoBean != null) {
|
||||||
avatar = userInfoBean!.avatar;
|
avatar = userInfoBean!.avatarThumb;
|
||||||
sharedPreferences.setString(SharedPreferencesHelper.AVATAR, avatar);
|
sharedPreferences.setString(SharedPreferencesHelper.AVATAR, avatar);
|
||||||
name = userInfoBean!.nickname;
|
name = userInfoBean!.nickname;
|
||||||
sharedPreferences.setString(SharedPreferencesHelper.NAME, name);
|
sharedPreferences.setString(SharedPreferencesHelper.NAME, name);
|
||||||
|
|||||||
@ -63,7 +63,11 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
Positioned(
|
Positioned(
|
||||||
top: 54.sp,
|
top: 54.sp,
|
||||||
left: 71.3.sp,
|
left: 71.3.sp,
|
||||||
child: Text(logic.vipMsg,style: TextStyle(color: const Color(0x99FFFFFF),fontSize: 12.sp),))
|
child: Text(logic.vipMsg,style: TextStyle(color: const Color(0x99FFFFFF),fontSize: 12.sp),)),
|
||||||
|
Positioned(
|
||||||
|
top: 24.sp,
|
||||||
|
left: 71.3.sp,
|
||||||
|
child: Text("会员-微乐园贵宾",style: TextStyle(color: const Color(0xFFFFFFFF),fontSize: 16.sp),))
|
||||||
],),
|
],),
|
||||||
),
|
),
|
||||||
_circleLiveView(logic),
|
_circleLiveView(logic),
|
||||||
@ -154,7 +158,7 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
const Text(
|
const Text(
|
||||||
"乐园客服在线等您哦",
|
"乐园客服在线等您哦",
|
||||||
style: TextStyle(color: Colors.white30),
|
style: TextStyle(color: Colors.white60),
|
||||||
),
|
),
|
||||||
Image(
|
Image(
|
||||||
image: AssetImage(getHomeImage("icon_in")),
|
image: AssetImage(getHomeImage("icon_in")),
|
||||||
@ -199,7 +203,7 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
logic.joinedCircle,
|
logic.joinedCircle,
|
||||||
style: const TextStyle(color: Colors.white30),
|
style: const TextStyle(color: Colors.white60),
|
||||||
),
|
),
|
||||||
Image(
|
Image(
|
||||||
image: AssetImage(getHomeImage("icon_in")),
|
image: AssetImage(getHomeImage("icon_in")),
|
||||||
@ -438,7 +442,7 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
if(logic.userInfoBean!=null){
|
if(logic.userInfoBean!=null){
|
||||||
var imgList = <String>[];
|
var imgList = <String>[];
|
||||||
imgList.add(logic.userInfoBean!.avatarThumb);
|
imgList.add(logic.userInfoBean!.avatar);
|
||||||
// Get.toNamed(AppRoutes.Swiper,arguments:imgList);
|
// Get.toNamed(AppRoutes.Swiper,arguments:imgList);
|
||||||
Get.toNamed(AppRoutes.Swiper, arguments: {
|
Get.toNamed(AppRoutes.Swiper, arguments: {
|
||||||
'imaglist': imgList,
|
'imaglist': imgList,
|
||||||
|
|||||||
@ -264,4 +264,6 @@ class TIMConversationItem extends TIMUIKitStatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class _SwiperPageState extends State<SwiperPage> {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
logic.imgList[index], fit: BoxFit.contain,)
|
"${logic.imgList[index]}?imageView2/0/q/60|watermark/2/text/5b6u5LmQ5ZutQVBQ/font/5b6u6L2v6ZuF6buR/fontsize/2160/fill/I0ZGRkZGRg==/dissolve/50/gravity/SouthEast/dx/60/dy/120", fit: BoxFit.contain,)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: logic.imgList.length,
|
itemCount: logic.imgList.length,
|
||||||
|
|||||||
@ -325,7 +325,12 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
padding: EdgeInsets.symmetric(vertical: 18.sp, horizontal: 19.sp),
|
padding: EdgeInsets.symmetric(vertical: 18.sp, horizontal: 19.sp),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final interest = interests[index];
|
final interest = interests[index];
|
||||||
return Container(
|
return GestureDetector(
|
||||||
|
onTap: (){
|
||||||
|
Get.toNamed(AppRoutes.Signal_circle_list,
|
||||||
|
arguments: interests[index].id);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
margin: EdgeInsets.only(right: 11.sp),
|
margin: EdgeInsets.only(right: 11.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(17.0),
|
borderRadius: BorderRadius.circular(17.0),
|
||||||
@ -361,6 +366,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@ -160,6 +160,7 @@ class PriceBean {
|
|||||||
double oldAmount;
|
double oldAmount;
|
||||||
bool isYearVip;
|
bool isYearVip;
|
||||||
String iosItem;
|
String iosItem;
|
||||||
|
String amountText;
|
||||||
|
|
||||||
PriceBean({
|
PriceBean({
|
||||||
required this.id,
|
required this.id,
|
||||||
@ -168,6 +169,7 @@ class PriceBean {
|
|||||||
required this.oldAmount,
|
required this.oldAmount,
|
||||||
required this.isYearVip,
|
required this.isYearVip,
|
||||||
required this.iosItem,
|
required this.iosItem,
|
||||||
|
required this.amountText,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory PriceBean.fromJson(Map<String, dynamic> json) {
|
factory PriceBean.fromJson(Map<String, dynamic> json) {
|
||||||
@ -175,6 +177,7 @@ class PriceBean {
|
|||||||
id: json['id'] as int,
|
id: json['id'] as int,
|
||||||
title: json['title'] as String,
|
title: json['title'] as String,
|
||||||
amount: json['amount'] as double,
|
amount: json['amount'] as double,
|
||||||
|
amountText :json['amount_text'] as String,
|
||||||
oldAmount: json['old_amount'] as double,
|
oldAmount: json['old_amount'] as double,
|
||||||
isYearVip: json['is_year_vip'] as bool,
|
isYearVip: json['is_year_vip'] as bool,
|
||||||
iosItem: json['ios_item'] as String,
|
iosItem: json['ios_item'] as String,
|
||||||
|
|||||||
@ -272,8 +272,8 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
typeItem(Open_vip_tipLogic controller, bool isSelected, int index) {
|
typeItem(Open_vip_tipLogic controller, bool isSelected, int index) {
|
||||||
double pricePerDay = controller.priceBean[index].amount / 30;
|
//double pricePerDay = controller.priceBean[index].amount / 30;
|
||||||
String formattedPricePerDay = '${pricePerDay.toStringAsFixed(2)}元/天';
|
// String formattedPricePerDay = '${pricePerDay.toStringAsFixed(2)}元/天';
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if(!isYean){
|
if(!isYean){
|
||||||
@ -311,7 +311,7 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
formattedPricePerDay,
|
controller.priceBean[index].amountText.toString(),
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
|
|||||||
@ -8,14 +8,14 @@ class PushConfig{
|
|||||||
// on the main page of console from Tencent Cloud IM.
|
// on the main page of console from Tencent Cloud IM.
|
||||||
|
|
||||||
// Business ID for HUAWEI
|
// Business ID for HUAWEI
|
||||||
static const HWPushBuzID = 0;
|
static const HWPushBuzID = 30671;
|
||||||
|
|
||||||
// Business ID for XiaoMi
|
// Business ID for XiaoMi
|
||||||
static const XMPushBuzID = 0;
|
static const XMPushBuzID = 30672;
|
||||||
|
|
||||||
// APP Info of XiaoMi
|
// APP Info of XiaoMi
|
||||||
static const String XMPushAPPID = "";
|
static const String XMPushAPPID = "2882303761520264048";
|
||||||
static const String XMPushAPPKEY = "";
|
static const String XMPushAPPKEY = "Yagmr/c0hntFMGWKweXqgg==";
|
||||||
|
|
||||||
// Business ID for Meizu
|
// Business ID for Meizu
|
||||||
static const MZPushBuzID = 0;
|
static const MZPushBuzID = 0;
|
||||||
@ -25,15 +25,15 @@ class PushConfig{
|
|||||||
static const String MZPushAPPKEY = "";
|
static const String MZPushAPPKEY = "";
|
||||||
|
|
||||||
// Business ID for Vivo
|
// Business ID for Vivo
|
||||||
static const VIVOPushBuzID = 0;
|
static const VIVOPushBuzID = 30673;
|
||||||
|
|
||||||
// Business ID for OPPO
|
// Business ID for OPPO
|
||||||
static const OPPOPushBuzID = 0;
|
static const OPPOPushBuzID = 30674;
|
||||||
|
|
||||||
// APP Info of OPPO
|
// APP Info of OPPO
|
||||||
static const String OPPOPushAPPKEY = "";
|
static const String OPPOPushAPPKEY = "09e35257df174f9db390b4b3257f241c";
|
||||||
static const String OPPOPushAPPSECRET = "";
|
static const String OPPOPushAPPSECRET = "7d17a5b2b2fc43eda61005807002f654";
|
||||||
static const String OPPOPushAPPID = "";
|
static const String OPPOPushAPPID = "31286141";
|
||||||
static const String OPPOChannelID = "new_message";
|
static const String OPPOChannelID = "new_message";
|
||||||
|
|
||||||
|
|
||||||
@ -64,10 +64,12 @@ class ChannelPush{
|
|||||||
|
|
||||||
static init(PushClickAction pushClickAction) async {
|
static init(PushClickAction pushClickAction) async {
|
||||||
// initialize the push plugin
|
// initialize the push plugin
|
||||||
cPush.init(
|
print("ChannelPush init");
|
||||||
|
bool isInit = await cPush.init(
|
||||||
pushClickAction: pushClickAction,
|
pushClickAction: pushClickAction,
|
||||||
appInfo: PushConfig.appInfo,
|
appInfo: PushConfig.appInfo,
|
||||||
);
|
);
|
||||||
|
print("token=初始化"+isInit.toString());
|
||||||
|
|
||||||
// create new notification channel
|
// create new notification channel
|
||||||
cPush.createNotificationChannel(
|
cPush.createNotificationChannel(
|
||||||
@ -79,9 +81,22 @@ class ChannelPush{
|
|||||||
|
|
||||||
// require the permission for notification
|
// require the permission for notification
|
||||||
cPush.requireNotificationPermission();
|
cPush.requireNotificationPermission();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<String> getDeviceToken() async {
|
static Future<String> getDeviceToken() async {
|
||||||
return cPush.getDevicePushToken();
|
return cPush.getDevicePushToken();
|
||||||
}
|
}
|
||||||
|
static Future<bool> uploadToken() async {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return await cPush.uploadToken(PushConfig.appInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
static setBadgeNum(int unreadCount){
|
||||||
|
cPush.setBadgeNum(unreadCount);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,14 +66,23 @@ logoutIM() async {
|
|||||||
|
|
||||||
//获取设备Token,获取成功后开启离线推送
|
//获取设备Token,获取成功后开启离线推送
|
||||||
void uploadBuzIDAndToken() async {
|
void uploadBuzIDAndToken() async {
|
||||||
|
await ChannelPush.init((msg) { });
|
||||||
|
|
||||||
int? businessID = await TimUiKitPushPlugin.getBuzId(PushConfig.appInfo);
|
int? businessID = await TimUiKitPushPlugin.getBuzId(PushConfig.appInfo);
|
||||||
|
|
||||||
String token = await ChannelPush.getDeviceToken();
|
String token = await ChannelPush.getDeviceToken();
|
||||||
|
ChannelPush.uploadToken();
|
||||||
|
|
||||||
|
print("token="+token);
|
||||||
if (token != "") {
|
if (token != "") {
|
||||||
coreInstance.setOfflinePushConfig(
|
V2TimCallback res = await coreInstance.setOfflinePushConfig(
|
||||||
token: token,
|
token: token,
|
||||||
businessID: businessID
|
businessID: businessID
|
||||||
);
|
);
|
||||||
|
print("token="+res.code.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -245,14 +254,20 @@ class MyApp extends StatefulWidget {
|
|||||||
State<MyApp> createState() => _MyAppState();
|
State<MyApp> createState() => _MyAppState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MyAppState extends State<MyApp> {
|
class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||||
|
AppLifecycleState? _lastLifecycleState;
|
||||||
// This widget is the root of your application.
|
// This widget is the root of your application.
|
||||||
|
|
||||||
final List<String> _guideList = ['bg', 'home_back'];
|
final List<String> _guideList = ['bg', 'home_back'];
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
// WidgetsBinding.instance.removeObserver(this);
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
initIM();
|
initIM();
|
||||||
|
// WidgetsBinding.instance.addObserver(this);
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
initWxApi();
|
initWxApi();
|
||||||
}
|
}
|
||||||
@ -262,6 +277,48 @@ class _MyAppState extends State<MyApp> {
|
|||||||
super.initState();
|
super.initState();
|
||||||
// getLoginStyle();
|
// getLoginStyle();
|
||||||
}
|
}
|
||||||
|
@override
|
||||||
|
void didChangeAppLifecycleState(AppLifecycleState state) async{
|
||||||
|
print("--" + state.toString());
|
||||||
|
_lastLifecycleState = state;
|
||||||
|
int? unreadCount = 0;
|
||||||
|
//获取会话未读总数
|
||||||
|
V2TimValueCallback<int> getTotalUnreadMessageCountRes =
|
||||||
|
await TencentImSDKPlugin.v2TIMManager
|
||||||
|
.getConversationManager()
|
||||||
|
.getTotalUnreadMessageCount();
|
||||||
|
if (getTotalUnreadMessageCountRes.code == 0) {
|
||||||
|
//拉取成功
|
||||||
|
unreadCount = getTotalUnreadMessageCountRes.data;//会话未读总数
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
switch (state) {
|
||||||
|
case AppLifecycleState.inactive:
|
||||||
|
TencentImSDKPlugin.v2TIMManager
|
||||||
|
.getOfflinePushManager()
|
||||||
|
.doBackground(unreadCount: unreadCount ?? 0);
|
||||||
|
if(unreadCount != null){
|
||||||
|
|
||||||
|
ChannelPush.setBadgeNum(unreadCount);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case AppLifecycleState.resumed:
|
||||||
|
TencentImSDKPlugin.v2TIMManager
|
||||||
|
.getOfflinePushManager()
|
||||||
|
.doForeground();
|
||||||
|
break;
|
||||||
|
case AppLifecycleState.paused:
|
||||||
|
TencentImSDKPlugin.v2TIMManager
|
||||||
|
.getOfflinePushManager()
|
||||||
|
.doBackground(unreadCount: unreadCount ?? 0);
|
||||||
|
if(unreadCount != null){
|
||||||
|
ChannelPush.setBadgeNum(unreadCount);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
getLoginStyle() async {
|
getLoginStyle() async {
|
||||||
if ((await getAuthorization()).isEmpty) {
|
if ((await getAuthorization()).isEmpty) {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
class Api {
|
class Api {
|
||||||
static const baseUrl = kDebugMode ? 'http://192.168.3.55:2000/' : 'https://leyuan666.com/zuul-service/';
|
static const baseUrl = !kDebugMode ? 'http://192.168.3.55:2000/' : 'https://leyuan666.com/zuul-service/';
|
||||||
|
|
||||||
// static const baseUrl = 'https://leyuan666.com/zuul-service/';
|
// static const baseUrl = 'https://leyuan666.com/zuul-service/';
|
||||||
|
|
||||||
|
|||||||
@ -67,9 +67,10 @@ void uploadImage(String quToken ,XFile pickedFile,String updataRoute,MyCallback
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var path = await getApplicationSupportDirectoryPath();
|
|
||||||
//if(isImageJpgOrPng(pickedFile.path)){
|
//if(isImageJpgOrPng(pickedFile.path)){
|
||||||
if(false){
|
if(false){
|
||||||
|
var path = await getApplicationSupportDirectoryPath();
|
||||||
CompressObject compressObject = CompressObject(
|
CompressObject compressObject = CompressObject(
|
||||||
imageFile:File(pickedFile.path),
|
imageFile:File(pickedFile.path),
|
||||||
path:path,
|
path:path,
|
||||||
@ -87,7 +88,9 @@ void uploadImage(String quToken ,XFile pickedFile,String updataRoute,MyCallback
|
|||||||
SmartDialog.dismiss(force: true);
|
SmartDialog.dismiss(force: true);
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
uploadQiniu(pickedFile.path,pickedFile.name,updataRoute,quToken,(result){
|
var path = await getApplicationSupportDirectoryPath();
|
||||||
|
String outputPath = path+"ceshishuiyin";
|
||||||
|
uploadQiniu(outputPath,pickedFile.name,updataRoute,quToken,(result){
|
||||||
myCallback(result);
|
myCallback(result);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user