Commit 0968a395 authored by 林生雨's avatar 林生雨

fix

parent ac0a214c
......@@ -75,7 +75,7 @@ class MainActivity : FlutterActivity() {
map.put("buildConfig", "debug")
map.put("provider", "com.example.gmalpha_flutter")
//HERE
// map.put("proxy", "172.30.9.84:6666");
// map.put("proxy", "172.30.9.137:6666");
result.success(map)
} else if (call.method == "UPLOAD_IMG") {
result.success("2019/10/17/1156/44dbb13ac6d9");
......
......@@ -2,5 +2,5 @@
<paths>
<!--path:需要临时授权访问的路径(.代表所有路径)-->
<!--name:就是你给这个访问路径起个名字-->
<external-path name="InstructiveRide" path="."/>
<external-path name="LLL" path="."/>
</paths>
\ No newline at end of file
......@@ -136,8 +136,18 @@ function android_publish(){
git push
}
function copyAAR(){
cp -r /Users/apple/lsy/gmalpha_flutter/build/flutter_boost/outputs/aar/flutter_boost-${suff}.aar /Users/apple/lsy/MergeTest/app/libs/flutter_boost.aar
cp -r /Users/apple/lsy/gmalpha_flutter/build/gengmei_flutter_plugin/outputs/aar/gengmei_flutter_plugin-${suff}.aar /Users/apple/lsy/MergeTest/app/libs/gengmei_flutter_plugin.aar
cp -r /Users/apple/lsy/gmalpha_flutter/build/path_provider/outputs/aar/path_provider-${suff}.aar /Users/apple/lsy/MergeTest/app/libs/path_provider.aar
cp -r /Users/apple/lsy/gmalpha_flutter/build/sqflite/outputs/aar/sqflite-${suff}.aar /Users/apple/lsy/MergeTest/app/libs/sqflite.aar
cp -r /Users/apple/lsy/gmalpha_flutter/build/xservice_kit/outputs/aar/xservice_kit-${suff}.aar /Users/apple/lsy/MergeTest/app/libs/xservice_kit.aar
}
#====upload
function upload_android_aar(){
cd /Users/apple/lsy/MergeTest
./gradlew clean
./gradlew assembleRelease
......@@ -250,11 +260,12 @@ mkdir /Users/apple/lsy/aar_update/androd${message}/
mkdir /Users/apple/lsy/aar_update/ios${message}/
clean
android_apk
#android_apk
#android
#android_publish
#copyAAR
#upload_android_aar
#ios
ios
#ios_publish
#notifyDingDing
......
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="11.5" fill="black" fill-opacity="0.2" stroke="white"/>
</svg>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.25 12C23.25 18.2132 18.2132 23.25 12 23.25C5.7868 23.25 0.75 18.2132 0.75 12C0.75 5.7868 5.7868 0.75 12 0.75C18.2132 0.75 23.25 5.7868 23.25 12Z" fill="white" stroke="white" stroke-width="1.5"/>
<path d="M6.97825 12.3108L10.4976 15.8302L17.6353 8.69248" stroke="#323232" stroke-width="1.5"/>
</svg>
<svg width="93" height="93" viewBox="0 0 93 93" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="93" height="93" fill="white"/>
<path d="M32.5 59.5V36.5H40L41.5 33.5H54L55.5 36.5H63.5V59.5H32.5Z" stroke="#323232" stroke-width="2"/>
<circle cx="48" cy="47" r="6" stroke="#323232" stroke-width="2"/>
<circle cx="58" cy="42" r="2" fill="#323232"/>
</svg>
......@@ -26,7 +26,7 @@
FlutterEventChannel* flutterEvent=[FlutterEventChannel
eventChannelWithName:@"flutter_channel_event" binaryMessenger:controller];
[flutterEvent setStreamHandler:self];
[flutterEvent setStreamHandler:self];
[buryChannel setMethodCallHandler:^(FlutterMethodCall* call,
FlutterResult result) {
......
......@@ -11,6 +11,6 @@ import 'package:gmalpha_flutter/Annotations/anno/Router.dart';
@Router("albumModel", AlbumRouterImpl, true)
abstract class AlbumRouter implements RouterBaser {
Widget getAlbumPage(String provider, bool showCamera, int bigSelectImage,
List<String> selectedImages);
List<String> selectedImages, bool fromNative, String fromPage,
{int maxVideoCount = 0, videoSelectPath = null, iosPushedPage = null});
}
......@@ -9,8 +9,10 @@ import 'package:gmalpha_flutter/AlbumModel/page/album/AlbumPage.dart';
class AlbumRouterImpl implements AlbumRouter {
@override
Widget getAlbumPage(String provider,
bool showCamera, int bigSelectSize, List<String> selectedImages) {
return AlbumPage(provider,showCamera, bigSelectSize, selectedImages);
Widget getAlbumPage(String provider, bool showCamera, int bigSelectSize,
List<String> selectedImages, bool fromNative, String fromPage,
{int maxVideoCount = 0, videoSelectPath , iosPushedPage }) {
return AlbumPage(provider, showCamera, bigSelectSize, selectedImages,
fromNative, maxVideoCount, videoSelectPath, fromPage,iosPushedPage);
}
}
This diff is collapsed.
This diff is collapsed.
......@@ -24,21 +24,28 @@ class AlbumRepository {
Observable<Map<String, List<ScanImageItem>>> scanPhoneImg() {
return Observable.fromFuture(GengmeiFlutterPlugin.phoneImages())
.map((value) {
if (value != null) {
_cacheList.clear();
_cacheList.addAll(value);
}
// Map<String, List<ScanImageItem>> finalList = new Map();
// var all = value["IsGengmeiAlbumAllImages"];
// if (all != null) {
// value.forEach((k, v) {
// List<ScanImageItem> newList = List();
// v.forEach((value) {
//
// });
// });
// }
//
// if (value != null) {}
return value;
});
}
get cacheList => _cacheList;
void clearMemory() {
_cacheList.clear();
}
Observable<String> nativeCamera(String provider) {
Observable<Map> nativeCamera(String provider) {
return Observable.fromFuture(GengmeiFlutterPlugin.nativeCamera(provider));
}
......
......@@ -24,18 +24,17 @@ Widget messageTop(imgUrl, title, content, count) {
children: <Widget>[
Container(
padding: EdgeInsets.only(top: height, bottom: height),
margin: EdgeInsets.only(
left: ScreenUtil.instance.setWidth(4)),
margin: EdgeInsets.only(left: ScreenUtil.instance.setWidth(4)),
width: double.infinity,
height: ScreenUtil.instance.setHeight(50),
child: Row(
children: <Widget>[
Hero(
tag: "icon",
child: SvgPicture.asset(
imgUrl,
color: ALColors.Color323232,
)),
tag: "icon",
child: SvgPicture.asset(
imgUrl,
color: ALColors.Color323232,
)),
SizedBox(
width: ScreenUtil.instance.setWidth(8),
),
......@@ -164,7 +163,9 @@ Widget messageList(Data list) {
"page_name": "message_home",
"topic_id": "${list.repliedContent.topicId}",
"user_name": list.name,
"pictorial_id": list.repliedContent.pictorialId
"pictorial_id": list.repliedContent.pictorialId == null
? null
: list.repliedContent.pictorialId
});
},
child: Container(
......
......@@ -13,7 +13,7 @@ class TestPage extends StatelessWidget {
TestPage() {
Api.getInstance().setDioCookie({
'Cookie':
'sessionid=oji01pi0mou9l5ktg425mibrimyq5vc3;_gtid=120408d4f3c911e99a80525400e82fab6178;_gm_token=06e9361571644418'
'_gm_token=709ed71571898502; sessionid=usixwh8e2bfykdsiq5ydt0ss6kfc0c26; _gtid=52ebb2a2f62611e9b181525400e82fab3838'
});
}
......@@ -50,10 +50,9 @@ class TestPage extends StatelessWidget {
testMessagePage(BuildContext context) {
return base(context, () {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()?.getMessagePage(''))
);
context,
new CustomRoute(
RouterCenterImpl().findNewMessageRouter()?.getMessagePage('')));
}, "消息页面");
}
......@@ -82,7 +81,12 @@ class TestPage extends StatelessWidget {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl().findAlbumRouter()?.getAlbumPage(
"com.example.gengmei_flutter_plugin_example", true, 9, null)));
"com.example.gmalpha_flutter",
true,
9,
null,
false,
"test",maxVideoCount: 1)));
}, "相册页面");
}
......@@ -99,30 +103,30 @@ class TestPage extends StatelessWidget {
attentionPage(BuildContext context) {
return base(context, () {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()?.getAttentionPage('message_home'))
);
context,
new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()
?.getAttentionPage('message_home')));
}, "通知页面");
}
likePage(BuildContext context) {
return base(context, () {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()?.getLikePage('message_home'))
);
context,
new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()
?.getLikePage('message_home')));
}, "like页面");
}
focusPage(BuildContext context) {
return base(context, () {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()?.getFocusPage('message_home'))
);
context,
new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()
?.getFocusPage('message_home')));
}, "关注页面");
}
}
......@@ -21,7 +21,9 @@ const NET_TYPE = "GET_NET_TYPE";
const INIT_PARAMS = "INIT_PARAMS";
const UPLOAD_IMG = "UPLOAD_IMG";
const USER_LOGOUT = "USER_LOGOUT";
const platform = const MethodChannel('flutter_channel');
const FINISH_CURRENT_ACTIVITY = "FINISH_CURRENT_ACTIVITY";
const ALBUM_RESULT = "ALBUM_RESULT";
const methodChannel = const MethodChannel('flutter_channel');
const eventChannel = const EventChannel('flutter_channel_event');
StreamSubscription _listen;
......@@ -30,7 +32,7 @@ void jumpToH5(String jumpToName, Map params) {
if (params != null) {
map.addAll(params);
}
platform.invokeMethod("FLUTTER_TO_H5", map);
methodChannel.invokeMethod("FLUTTER_TO_H5", map);
}
void jumpToNative(String jumpToName, Map params) {
......@@ -38,7 +40,7 @@ void jumpToNative(String jumpToName, Map params) {
if (params != null) {
map.addAll(params);
}
platform.invokeMethod("FLUTTER_TO_NATIVE", map);
methodChannel.invokeMethod("FLUTTER_TO_NATIVE", map);
}
void jumpToFlutter(String jumpToName, Map params) {
......@@ -46,35 +48,45 @@ void jumpToFlutter(String jumpToName, Map params) {
if (params != null) {
map.addAll(params);
}
platform.invokeMethod("FLUTTER_TO_FLUTTER", map);
methodChannel.invokeMethod("FLUTTER_TO_FLUTTER", map);
}
Future getBuriedInfo() async {
return await platform.invokeMethod(BURIED_METHOD, null);
return await methodChannel.invokeMethod(BURIED_METHOD, null);
}
Observable messagePopPicker(Map params) {
return Observable.fromFuture(
platform.invokeMethod("MESSAGE_POP_PICKER", params));
methodChannel.invokeMethod("MESSAGE_POP_PICKER", params));
}
Observable getNetType() {
return Observable.fromFuture(platform.invokeMethod(NET_TYPE, null));
return Observable.fromFuture(methodChannel.invokeMethod(NET_TYPE, null));
}
Observable<String> uploadImg(String path, String token) {
return Observable.fromFuture(
platform.invokeMethod(UPLOAD_IMG, {"path": path, "token": token}));
methodChannel.invokeMethod(UPLOAD_IMG, {"path": path, "token": token}));
}
Observable<bool> userLogout() {
return Observable.fromFuture(platform.invokeMethod(USER_LOGOUT));
return Observable.fromFuture(methodChannel.invokeMethod(USER_LOGOUT));
}
Observable<bool> finishCurrentActivity() {
return Observable.fromFuture(
methodChannel.invokeMethod(FINISH_CURRENT_ACTIVITY));
}
Observable<bool> albumResult(Map selectList) {
return Observable.fromFuture(
methodChannel.invokeMethod(ALBUM_RESULT, selectList));
}
void initParams(VoidCallback callback) {
_listen =
eventChannel.receiveBroadcastStream().listen(_onEvent, onError: _onError);
platform.invokeMethod(INIT_PARAMS, null).then((value) {
methodChannel.invokeMethod(INIT_PARAMS, null).then((value) {
print("lsy INITPARAMS !! $value");
Api.getInstance().initBuildConfig(value);
initBuried(callback);
......
......@@ -28,12 +28,14 @@ AppBar baseAppBarChangeTitle(
bool centerTitle,
VoidCallback backClick}) {
return AppBar(
backgroundColor: ALColors.ColorFFFFFF,
title: title,
centerTitle: centerTitle,
elevation: 0.0,
leading: GestureDetector(
onTap: backClick,
child: Container(
color: ALColors.ColorFFFFFF,
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 22),
width: 30,
......
......@@ -15,12 +15,14 @@ class BaseCenterPicker extends StatefulWidget {
setPicker(ICenterPicker picker) {
this.picker = picker;
}
sync() {
centerState?.setState(() {});
}
setCancelOutside(bool cancel) {
this.cancelOutSide = cancel;
centerState?.setState(() {});
}
show(BuildContext context) {
......@@ -41,9 +43,8 @@ class BaseCenterPicker extends StatefulWidget {
class BaseCenterPickerState extends State<BaseCenterPicker> {
@override
Widget build(BuildContext context) {
ScreenUtil.instance = ScreenUtil(width: 375, height: 667)..init(context);
return CupertinoFullscreenDialogTransition(
child: Container(
// ScreenUtil.instance = ScreenUtil(width: 375, height: 667)..init(context);
return Container(
color: Colors.black54,
width: double.maxFinite,
height: double.maxFinite,
......@@ -63,7 +64,7 @@ class BaseCenterPickerState extends State<BaseCenterPicker> {
))
],
),
));
);
}
}
......
......@@ -7,10 +7,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gmalpha_flutter/Annotations/RouterCenterRestore.mark.dart';
import 'package:gmalpha_flutter/Error_Page.dart';
import 'package:gmalpha_flutter/TestPage.dart';
import 'package:gmalpha_flutter/commonModel/cache/CacheManager.dart';
import 'package:gmalpha_flutter/commonModel/net/Api.dart';
import 'package:gmalpha_flutter/commonModel/util/IsolateUtil.dart';
import 'package:gmalpha_flutter/messageModel/home/message_home.dart';
import 'commonModel/GMBase.dart';
......@@ -59,16 +55,26 @@ class _MyAppState extends State<MyApp> {
if (params == null) {
return ErrorPage("出错:需要传递的参数为空");
}
var provider = params["provider"] as String;
return RouterCenterImpl().findAlbumRouter().getAlbumPage(
provider,
params["provider"] as String,
params["needCamera"] == null
? true
: params["needCamera"] == "0" ? true : false,
params["maxCount"] == null ? 1 : int.parse(params["maxCount"]),
params["selectedPath"] == null
? null
: params["selectedPath"] as List<String>);
: new List<String>.from(params["selectedPath"]),
true,
params["fromPage"] == null ? "" : params["fromPage"],
maxVideoCount: params["maxVideoCount"] == null
? 0
: int.parse(params["maxVideoCount"]),
videoSelectPath: params["videoSelectedPath"] == null
? null
: new List<String>.from(params["videoSelectedPath"]),
iosPushedPage: params["iosPushedPage"] == null
? null
: params["iosPushedPage"]);
},
"prestige": (pageName, params, _) {
print("PARAMS!! ${params}");
......@@ -87,13 +93,13 @@ class _MyAppState extends State<MyApp> {
return RouterCenterImpl()
.findActivityReportRouter()
?.getActivityReportPage(
params["survey_record_id"] == null
? null
: int.parse(params["survey_record_id"]),
params["template_id"] == null
? null
: int.parse(params["template_id"]),
params["fromPage"]);
params["survey_record_id"] == null
? null
: int.parse(params["survey_record_id"]),
params["template_id"] == null
? null
: int.parse(params["template_id"]),
params["fromPage"]);
},
"message_focus": (pageName, params, _) {
return RouterCenterImpl()
......
......@@ -26,6 +26,7 @@ class ALColors {
static const Color Color5276F4 = Color(0xFF5276F4);
static const Color Color0093FF = Color(0xFF0093FF);
static const Color Color666666 = Color(0xFF666666);
static const Color Color33000000 = Color(0x33000000);
}
......@@ -4,6 +4,7 @@
**/
import 'dart:async';
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
......@@ -113,7 +114,13 @@ class UserSettingModel extends BaseModel {
jumpToCamera(context, pageName, Api.PROVIDER_NAME, true, 1, null)
.then((value) {
if (value != null) {
print("$value");
selectImgPath = value[0];
File txt=File(selectImgPath);
var dir_bool=txt.exists().then((value){
print("RESULT!!!!!$selectImgPath bool ${value}" );
});
headImgLive.notifyView(selectImgPath);
detectUpdate();
}
......
......@@ -10,6 +10,7 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/messagePage/common.dart';
import 'package:gmalpha_flutter/commonModel/GMBase.dart';
import 'package:gmalpha_flutter/commonModel/base/BaseBuried.dart';
import 'package:gmalpha_flutter/commonModel/base/BaseComponent.dart';
......@@ -53,6 +54,7 @@ class UserState extends BasePage<UserSettingPage> {
baseLoadingItem = BaseLoadingItem("加载中");
userLogoutPicker = UserLogoutPicker(() {
logoutPicker.setPicker(baseLoadingItem);
logoutPicker.sync();
_model.quit(context, pageName(), () {
logoutPicker.dismiss(context);
});
......@@ -94,8 +96,10 @@ class UserState extends BasePage<UserSettingPage> {
} else {
return GestureDetector(
onTap: () {
BaseCenterPicker()..setPicker(BaseLoadingItem("加载中"))
..setCancelOutside(true)..show(context);
var picker = BaseCenterPicker()
..setPicker(BaseLoadingItem("加载中"))
..setCancelOutside(true);
picker.show(context);
_model.save(context);
},
child: Padding(
......@@ -115,7 +119,7 @@ class UserState extends BasePage<UserSettingPage> {
Container(
margin: EdgeInsets.fromLTRB(ScreenUtil.instance.setWidth(29),
ScreenUtil.instance.setWidth(25), 0, 0),
child: baseText("设置", 30, ALColors.Color323232),
child: baseText('设置', 30, ALColors.Color323232),
),
Container(
width: ScreenUtil.instance.setWidth(127),
......@@ -127,6 +131,7 @@ class UserState extends BasePage<UserSettingPage> {
ScreenUtil.instance.setWidth(23)),
child: GestureDetector(
onTap: () {
clickEvent("page_setting_up","photograph");
_model.jumpToCAM(context, pageName());
},
child: Stack(
......@@ -230,8 +235,8 @@ class UserState extends BasePage<UserSettingPage> {
jumpToComment(context, pageName());
}, "意见与建议", null, true),
baseDivide(1, 30, ALColors.ColorE4E4E4),
baseItem(() {}, "隐私声明", null, true),
baseDivide(1, 30, ALColors.ColorE4E4E4),
// baseItem(() {}, "隐私声明", null, true),
// baseDivide(1, 30, ALColors.ColorE4E4E4),
],
),
Expanded(
......@@ -246,9 +251,10 @@ class UserState extends BasePage<UserSettingPage> {
right: ScreenUtil.instance.setWidth(30)),
child: OutlineButton(
onPressed: () {
clickEvent("page_setting_up", "quit");
logoutPicker.show(context);
},
child: baseText("退出登", 14, ALColors.Color323232),
child: baseText("退出登", 14, ALColors.Color323232),
borderSide: new BorderSide(color: Color(0xff323232)),
),
)
......
......@@ -19,7 +19,7 @@ Future jumpToCamera(BuildContext context, String refer, String provider,
return Navigator.push(
context,
CustomRoute(RouterCenterImpl().findAlbumRouter()?.getAlbumPage(
provider, showCamera, bigSelectImage, selectedImages)));
provider, showCamera, bigSelectImage, selectedImages, false, refer)));
}
Future jumpToCountry(BuildContext context, String refer) {
......
......@@ -39,7 +39,7 @@ dependencies:
gengmei_flutter_plugin:
git:
url: 'git@git.wanmeizhensuo.com:linshengyu/flutter_plugin.git'
ref: "703b4906beabe5fa9ba4e5e76a5b43799a25f89b"
ref: "00b2ed0f616c59ba5352a1dd9a3ed1fe8b2d7cdb"
protobuf: ^0.14.4
grpc: ^2.1.2
flutter_svg: ^0.14.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment