浏览代码

1、提交QQ

tags/0.0.1
PH2 4 年前
父节点
当前提交
e856b59023
共有 8 个文件被更改,包括 80 次插入50 次删除
  1. +64
    -44
      example/android/app/build.gradle
  2. +6
    -2
      example/android/app/src/main/AndroidManifest.xml
  3. +4
    -0
      example/android/app/src/main/res/values/strings.xml
  4. +1
    -1
      lib/widgets/search/history_tag/search_history_tag.dart
  5. +1
    -1
      lib/widgets/search/hot_tag/search_hot_tag_widget.dart
  6. +2
    -1
      lib/widgets/search/input/search_input_widget.dart
  7. +1
    -1
      lib/widgets/search/tabbar/search_tab_widget.dart
  8. +1
    -0
      lib/widgets/search_result/search_input/search_result_input.dart

+ 64
- 44
example/android/app/build.gradle 查看文件

@@ -29,6 +29,7 @@ def releaseTime() {
}

apply plugin: 'com.android.application'
apply plugin: 'com.mob.sdk'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"


@@ -91,50 +92,50 @@ android {

//
// // 签名配置
// signingConfigs {
// // 智夜生活
// zhiying {
// storeFile file('zhiying.jks')
// storePassword 'zhioscom'
// keyAlias 'zysh'
// keyPassword 'zhioscom'
// v1SigningEnabled true
// v2SigningEnabled true
// }
//
// }
//
// flavorDimensions "app"
//
//
// // 应用信息配置
// productFlavors {
// // 智夜生活
// zhiying {
// applicationId "cn.zhios.zhiying"
// versionCode 1
// dimension "app"
// versionName '1.0.0'
// // 签名信息
// signingConfig signingConfigs.zhiying
// }
// }
//
// // 打包脚本
// android.applicationVariants.all { variant ->
// if (variant.buildType.name != "debug") {
// variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk")
// }
//
// variant.outputs.all { output ->
// def outputFile = output.outputFile
// if (outputFile != null && outputFile.name.endsWith('.apk')) {
// //这里修改apk文件名
// def fileName = "${variant.productFlavors[0].name}_${releaseTime()}01_&V${variant.productFlavors[0].versionCode}.apk"
// outputFileName = fileName
// }
// }
// }
signingConfigs {
// 智夜生活
zhiying {
storeFile file('zhiying.jks')
storePassword 'zhioscom'
keyAlias 'zysh'
keyPassword 'zhioscom'
v1SigningEnabled true
v2SigningEnabled true
}
}
flavorDimensions "app"
// 应用信息配置
productFlavors {
// 智夜生活
zhiying {
applicationId "cn.zhios.zhiying"
versionCode 1
dimension "app"
versionName '1.0.0'
// 签名信息
signingConfig signingConfigs.zhiying
}
}
// 打包脚本
android.applicationVariants.all { variant ->
if (variant.buildType.name != "debug") {
variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk")
}
variant.outputs.all { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
//这里修改apk文件名
def fileName = "${variant.productFlavors[0].name}_${releaseTime()}01_&V${variant.productFlavors[0].versionCode}.apk"
outputFileName = fileName
}
}
}

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
@@ -162,6 +163,25 @@ dependencies {
}


MobSDK {
appKey "30dc33054b635"
appSecret "396e98c293130c9976fb7428b6b434d6"

ShareSDK {

// platform configuration information
devInfo {
QQ {
appId "1111030588"
appKey "XoHKlrBybXy7ORBt"
shareByAppClient true
bypassApproval false
enable true
}
}
}
}

// 注册SecVerify的相关信息
//MobSDK {
//// appKey "2ed488d929488"


+ 6
- 2
example/android/app/src/main/AndroidManifest.xml 查看文件

@@ -8,10 +8,10 @@
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="zhiying_base_widget_example"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true"
tools:replace="android:label">
tools:replace="android:name">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
@@ -33,4 +33,8 @@

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET"/>



</manifest>

+ 4
- 0
example/android/app/src/main/res/values/strings.xml 查看文件

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">智莺生活</string>
</resources>

+ 1
- 1
lib/widgets/search/history_tag/search_history_tag.dart 查看文件

@@ -40,7 +40,7 @@ class _SearchHistoryTagWidgetState extends State<SearchHistoryTagWidget> {
/// 点击历史标签
void _historyTagClick(String tag) {
if (!EmptyUtil.isEmpty(tag)) {
Navigator.push(context, MaterialPageRoute(builder: (_) => SearchResultPage({'keywords': tag ?? ''})));
Navigator.push(context, MaterialPageRoute(builder: (_) => SearchResultPage({'keywords': tag ?? '', 'tag': 'search_page'})));
}
}



+ 1
- 1
lib/widgets/search/hot_tag/search_hot_tag_widget.dart 查看文件

@@ -31,7 +31,7 @@ class SearchHotTagWidget extends StatelessWidget {

await Provider.of<SearchTagNotifier>(context, listen: false).addTag(model.keyword);

Navigator.push(context, MaterialPageRoute(builder: (_) => SearchResultPage({'keywords': model?.keyword ?? ''})));
Navigator.push(context, MaterialPageRoute(builder: (_) => SearchResultPage({'keywords': model?.keyword ?? '', 'tag': 'search_page'})));
}
}



+ 2
- 1
lib/widgets/search/input/search_input_widget.dart 查看文件

@@ -40,7 +40,7 @@ class _SearchInputWidgetState extends State<SearchInputWidget> {
/// TODO 保存历史标签
if (!EmptyUtil.isEmpty(content)) {
await Provider.of<SearchTagNotifier>(context, listen: false).addTag(content);
Navigator.push(context, MaterialPageRoute(builder: (_) => SearchResultPage({'keywords': content})));
Navigator.push(context, MaterialPageRoute(builder: (_) => SearchResultPage({'keywords': content, 'tag': 'search_page'})));
}else{
Fluttertoast.showToast(msg: '输入内容不能为空!');
}
@@ -190,6 +190,7 @@ class _SearchInputWidgetState extends State<SearchInputWidget> {
style: TextStyle(fontSize: 14, color: HexColor.fromHex('#333333')),
decoration: InputDecoration(
filled: false,
contentPadding: const EdgeInsets.only(left: 0, right: 0, bottom: 12, top: 0),
// focusColor: Colors.transparent,
// fillColor: Colors.transparent,
border: InputBorder.none,


+ 1
- 1
lib/widgets/search/tabbar/search_tab_widget.dart 查看文件

@@ -37,7 +37,7 @@ class _SearchTabWidgetState extends State<SearchTabWidget> {
/// 联想列表的item点击事件
_onThinkItemClick(SearchThinkModel model){
Navigator.push(context, MaterialPageRoute(
builder: (_)=> SearchResultPage(model.toJson())
builder: (_)=> SearchResultPage(model.toJson()..['tag'] = 'search_page')
));
}



+ 1
- 0
lib/widgets/search_result/search_input/search_result_input.dart 查看文件

@@ -153,6 +153,7 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> {
style: TextStyle(fontSize: 14, color: HexColor.fromHex('#333333')),
decoration: InputDecoration(
filled: false,
contentPadding: const EdgeInsets.only(left: 0, right: 0, top: 0, bottom: 12),
// focusColor: Colors.transparent,
// fillColor: Colors.transparent,
border: InputBorder.none,


正在加载...
取消
保存