瀏覽代碼

更新分享页面

tags/0.0.2+1^0
Weller 4 年之前
父節點
當前提交
52e8942c47
共有 11 個文件被更改,包括 225 次插入89 次删除
  1. +36
    -18
      .dart_tool/package_config.json
  2. +6
    -0
      example/ios/Podfile.lock
  3. +36
    -22
      lib/pages/goods_share_page/goods_share_bloc.dart
  4. +9
    -9
      lib/pages/goods_share_page/goods_share_link/goods_share_link.dart
  5. +81
    -19
      lib/pages/goods_share_page/goods_share_miniprogram/goods_share_miniprogram.dart
  6. +5
    -5
      lib/pages/goods_share_page/goods_share_page.dart
  7. +4
    -8
      lib/pages/goods_share_page/models/goods_share_style_model.dart
  8. +31
    -2
      lib/pages/goods_share_page/models/goods_share_temp_add_model.dart
  9. +8
    -2
      lib/pages/goods_share_page/widgets/goods_share_link_widget.dart
  10. +8
    -3
      lib/pages/goods_share_page/widgets/goods_share_miniprogram_widget.dart
  11. +1
    -1
      lib/pages/orders_page/views/order_tabbar_widget.dart

+ 36
- 18
.dart_tool/package_config.json 查看文件

@@ -63,13 +63,13 @@
},
{
"name": "connectivity_for_web",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/connectivity_for_web-0.3.1+2",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/connectivity_for_web-0.3.1+4",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "connectivity_macos",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/connectivity_macos-0.1.0+5",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/connectivity_macos-0.1.0+7",
"packageUri": "lib/",
"languageVersion": "2.1"
},
@@ -93,7 +93,7 @@
},
{
"name": "device_info",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+9",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+10",
"packageUri": "lib/",
"languageVersion": "2.1"
},
@@ -141,7 +141,7 @@
},
{
"name": "flutter_alibc",
"rootUri": "file:///Users/fnuser/.pub-cache/git/zhiying_flutter_alibc-6e02aaf22b9798f4b01554a9153d2c66591da8c1/",
"rootUri": "file:///Users/fnuser/.pub-cache/git/zhiying_flutter_alibc-ba413f84090cd58b8b769ca43ff3ef65a0e53274/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
@@ -187,6 +187,12 @@
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "flutter_slidable",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_slidable-0.5.7",
"packageUri": "lib/",
"languageVersion": "1.19"
},
{
"name": "flutter_swiper",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_swiper-1.1.6",
@@ -199,12 +205,24 @@
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "flutter_update_dialog",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_update_dialog-1.0.0",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "flutter_web_plugins",
"rootUri": "file:///Users/fnuser/Documents/flutter-sdk/packages/flutter_web_plugins",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "flutter_xupdate",
"rootUri": "file:///Users/fnuser/.pub-cache/git/flutter_xupdate-d17c695461ee4588dec990533d7467c11884cd0f/",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "fluttertoast",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-4.0.1",
@@ -237,7 +255,7 @@
},
{
"name": "image_picker",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+12",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+14",
"packageUri": "lib/",
"languageVersion": "2.1"
},
@@ -285,7 +303,7 @@
},
{
"name": "package_info",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3+2",
"packageUri": "lib/",
"languageVersion": "2.1"
},
@@ -297,7 +315,7 @@
},
{
"name": "path_provider",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.22",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.24",
"packageUri": "lib/",
"languageVersion": "2.1"
},
@@ -309,19 +327,19 @@
},
{
"name": "path_provider_macos",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+4",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+6",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_platform_interface",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/path_provider_platform_interface-1.0.3",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/path_provider_platform_interface-1.0.4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_windows",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-0.0.4+1",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-0.0.4+3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
@@ -405,19 +423,19 @@
},
{
"name": "shared_preferences",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12+2",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12+4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_linux",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+2",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_macos",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+10",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+11",
"packageUri": "lib/",
"languageVersion": "2.1"
},
@@ -435,7 +453,7 @@
},
{
"name": "shared_preferences_windows",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-0.0.1+1",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-0.0.1+3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
@@ -543,13 +561,13 @@
},
{
"name": "url_launcher_linux",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-0.0.1+3",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-0.0.1+4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "url_launcher_macos",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+8",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+9",
"packageUri": "lib/",
"languageVersion": "2.1"
},
@@ -567,7 +585,7 @@
},
{
"name": "url_launcher_windows",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_windows-0.0.1+1",
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_windows-0.0.1+3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
@@ -620,7 +638,7 @@
"languageVersion": "2.8"
}
],
"generated": "2020-11-02T09:37:11.598457Z",
"generated": "2020-11-11T02:35:44.319396Z",
"generator": "pub",
"generatorVersion": "2.8.2"
}

+ 6
- 0
example/ios/Podfile.lock 查看文件

@@ -28,6 +28,8 @@ PODS:
- Flutter
- flutter_plugin_android_lifecycle (0.0.1):
- Flutter
- flutter_xupdate (0.0.1):
- Flutter
- fluttertoast (0.0.2):
- Flutter
- FMDB (2.7.5):
@@ -178,6 +180,7 @@ DEPENDENCIES:
- flutter_alibc (from `.symlinks/plugins/flutter_alibc/ios`)
- flutter_native_image (from `.symlinks/plugins/flutter_native_image/ios`)
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
- flutter_xupdate (from `.symlinks/plugins/flutter_xupdate/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
@@ -240,6 +243,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_native_image/ios"
flutter_plugin_android_lifecycle:
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
flutter_xupdate:
:path: ".symlinks/plugins/flutter_xupdate/ios"
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
image_cropper:
@@ -308,6 +313,7 @@ SPEC CHECKSUMS:
flutter_alibc: 0e2a29e7c1de759672d87a260051240d209964b9
flutter_native_image: 9c0b7451838484458e5b0fae007b86a4c2d4bdfe
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
flutter_xupdate: bdb588f0fe4f6c5e45436b8b0de08d505a50c04e
fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a


+ 36
- 22
lib/pages/goods_share_page/goods_share_bloc.dart 查看文件

@@ -26,42 +26,56 @@ class GoodsShareBloc extends BlocBase {
}

void loadData(String shopType, Map<String, dynamic> params) async {
var json = await NetUtil.post('/api/v1/share/${shopType}', params: params);
Map<String, dynamic> data = json['data'];
List shareTemp = data['data_list'];
_data.datas = shareTemp.map((item) {
return GoodsShareTempDataModel.fromJson(Map<String, dynamic>.from(item));
}).toList();
await loadPoster(params);
await loadMod(shopType);
await loadInfo(shopType, params);
_tabController.add(_data);
}

Future loadPoster(Map<String, dynamic> params) async {
_data.poster = await _loadPoster(params);
}

NetUtil.request(
'/api/v1/mod/pub.flutter.share?share_type=${shopType.toString()}',
method: NetMethod.GET,
onCache: (data) {
_loadData(data);
},
onSuccess: (data) {
_loadData(data);
},
);
Future loadMod(String shopType) async {
var data = await NetUtil.post(
'/api/v1/tmp/mod/pub.flutter.share?type=${shopType.toString()}',
method: NetMethod.GET);
_loadMod(data['data']);
}

void _loadData(dynamic data) {
void _loadMod(dynamic data) {
try {
List list = Map<String, dynamic>.from(data)['mod_list'];
_data.tabs = list.map((item) {
return Map<String, dynamic>.from(item);
}).toList();
_tabController.add(_data);
for (dynamic model in list) {
Map d = Map<String, dynamic>.from(model);
if (d.containsKey('tab_view')) {
List tabs = d['tab_view'];
_data.tabs = tabs.map((item) {
return Map<String, dynamic>.from(item);
}).toList();
}
}
} catch (err) {
Logger.error(err);
}
}

Future loadInfo(String shopType, Map<String, dynamic> params) async {
_data.datas = List();
for (Map<String, dynamic> item in _data.tabs) {
String url = item['url'];
Logger.debug(url);
var json = await NetUtil.post('/api/v1/share?type=${url.toString()}',
params: params);
Map<String, dynamic> data = json['data'];
_data.datas.add(
GoodsShareTempDataModel.fromJson(Map<String, dynamic>.from(data)));
}
}

// 请求分享海报
Future<GoodsSharePosterModel> _loadPoster(Map<String, dynamic> params) async {
var json = await NetUtil.post('/api/v1/share/poster', params: params);
var json = await NetUtil.post('/api/v1/share?type=poster', params: params);
Map<String, dynamic> data = Map<String, dynamic>.from(json['data']);

return GoodsSharePosterModel.fromJson(data);


+ 9
- 9
lib/pages/goods_share_page/goods_share_link/goods_share_link.dart 查看文件

@@ -8,7 +8,6 @@ import 'package:zhiying_base_widget/pages/goods_share_page/goods_share_editor/go
import 'package:zhiying_base_widget/pages/goods_share_page/goods_share_image/goods_share_image_model.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/models/goods_share_temp_add_model.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/widgets/good_share_msg.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/widgets/goods_share_alert_content.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/widgets/goods_share_edit.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/widgets/goods_share_item.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/widgets/goods_share_link_widget.dart';
@@ -61,17 +60,18 @@ class _GoodsShareLinkState extends State<GoodsShareLink>
imgCheckSelected: _style.cssList.chooseImage,
enabled: false,
child: GoodsShareLinkWidget(
title: '小米10至尊纪念版5g手机120X变焦骁龙865小米官方旗舰店小米手机',
desc: '【原价】3999元【券后3989元【用嗨如意再省】19.74元復製(FRH51Lu9hYF',
imgGoods: '',
icon: '',
name: '智莺生活',
title: widget.datas?.title ?? '',
desc: widget.datas?.content ?? '',
imgGoods: widget.datas?.imgUrl ?? '',
icon: widget.datas?.appLogo ?? '',
name: widget.datas?.appName ?? '',
),
));
widgets.add(GoodsShareItem(
imgHeader: _style.cssList.headerImage,
imgCheck: _style.cssList.unChooseImage,
imgCheckSelected: _style.cssList.chooseImage,
enabled: false,
child: GoodsShareEdit(
_content,
widget.datas,
@@ -137,7 +137,7 @@ class _GoodsShareLinkState extends State<GoodsShareLink>
}

Widget _createBottom() {
Map<String, dynamic> shareImages = _style.cssList.shareLink;
Map<String, dynamic> shareImages = _style.cssList.shareImage;
if (shareImages == null) {
return Container();
}
@@ -195,8 +195,8 @@ class _GoodsShareLinkState extends State<GoodsShareLink>
context: context,
builder: (context) => ShareAlert(
_shareModel,
'',
child: GoodsShareAlertContent(),
'pub.flutter.share_icon',
// child: GoodsShareAlertContent(),
),
);
}


+ 81
- 19
lib/pages/goods_share_page/goods_share_miniprogram/goods_share_miniprogram.dart 查看文件

@@ -1,7 +1,12 @@
import 'dart:convert' as convert;

import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/goods_share_image/goods_share_image_model.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/models/goods_share_temp_add_model.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/widgets/goods_share_item.dart';
import 'package:zhiying_base_widget/pages/goods_share_page/widgets/goods_share_miniprogram_widget.dart';
import 'package:zhiying_base_widget/widgets/public/custom_button/custom_bottom.dart';
import 'package:zhiying_base_widget/widgets/public/custom_button/custom_button_model.dart';

class GoodsShareMiniprogram extends StatefulWidget {
final Map<String, dynamic> model;
@@ -17,32 +22,89 @@ class GoodsShareMiniprogram extends StatefulWidget {

class _GoodsShareMiniprogramState extends State<GoodsShareMiniprogram>
with AutomaticKeepAliveClientMixin {
@override
GoodsShareImageModel _style;
Map<int, String> _images = Map();
List<Widget> widgets = List();

// 切换Tab导航栏保持页面状态
bool get wantKeepAlive => true;

@override
void initState() {
String data = widget.model['data'];
var d = convert.jsonDecode(data);
_style = GoodsShareImageModel.fromJson(Map<String, dynamic>.from(d));
super.initState();
}

@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(bottom: 4),
padding: EdgeInsets.only(top: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(8), bottomRight: Radius.circular(8))),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
GoodsShareItem(
child: GoodsShareMiniprogramWidget(
title: '小米10至尊纪念版5g手机120X变焦骁龙865小米官方旗舰店小米手机',
imgGoods: '',
icon: '',
name: '智莺生活',
return Column(
children: <Widget>[
Expanded(
child: Container(
margin: EdgeInsets.only(bottom: 4),
padding: EdgeInsets.only(top: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(8),
bottomRight: Radius.circular(8))),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
GoodsShareItem(
imgHeader: _style.cssList.headerImage,
imgCheck: _style.cssList.unChooseImage,
imgCheckSelected: _style.cssList.chooseImage,
enabled: false,
child: GoodsShareMiniprogramWidget(
title: widget.datas?.miniAppTitle ?? '',
imgGoods: widget.datas?.imgUrl ?? '',
icon: widget.datas?.appLogo ?? '',
name: widget.datas?.appName ?? '',
),
),
],
),
),
),
),
_createBottom(),
],
);
}

Widget _createBottom() {
Map<String, dynamic> shareImages = _style.cssList.shareImage;
if (shareImages == null) {
return Container();
}
// CustomButtonModel btnCopy = CustomButtonModel.fromJson(
// Map<String, dynamic>.from(shareImages['copy_btn']));
CustomButtonModel btnShare = CustomButtonModel.fromJson(
Map<String, dynamic>.from(shareImages['share_btn']));
return SafeArea(
child: Container(
margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 4, bottom: 4),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
btnShare == null
? Container()
: GestureDetector(
child: Container(
margin: EdgeInsets.only(left: 5),
width: 110,
height: 36,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(18),
),
child: CustomButton(btnShare)),
onTap: () {},
),
],
),
),


+ 5
- 5
lib/pages/goods_share_page/goods_share_page.dart 查看文件

@@ -81,16 +81,16 @@ class _GoodsShareContainerState extends State<_GoodsShareContainer>
Map<String, dynamic> item = list[i];
GoodsShareTempDataModel model = datas[i];
_tabs.add(_createTabItem(item['title']));
String mod_name = item['mod_name'];
if (mod_name == 'share_goods_image.taobao') {
String type = item['url'];
if (type == 'image') {
_contents.add(GoodsShareImage(
item,
model,
poster: data.poster,
));
} else if (mod_name == 'share_goods_link.taobao') {
} else if (type == 'link') {
_contents.add(GoodsShareLink(item, model));
} else if (mod_name == 'share_goods_mini.taobao') {
} else if (type == 'mini') {
_contents.add(GoodsShareMiniprogram(item, model));
} else {
_contents.add(Container());
@@ -99,7 +99,7 @@ class _GoodsShareContainerState extends State<_GoodsShareContainer>

return Column(
children: <Widget>[
_createCommission(),
// _createCommission(),
Expanded(child: SafeArea(child: _createContent())),
],
);


+ 4
- 8
lib/pages/goods_share_page/models/goods_share_style_model.dart 查看文件

@@ -9,8 +9,6 @@ class GoodsShareStyleModel {
String rewardImage;
String rewardText;
Map<String, dynamic> shareImage;
Map<String, dynamic> shareLink;
Map<String, dynamic> shareMini;
GoodsShareTempEditorModel editTemplate;

GoodsShareStyleModel(
@@ -33,10 +31,10 @@ class GoodsShareStyleModel {
rewardImage = json['reward_image'];
rewardText = json['reward_text'];
shareImage = json['share_image'];
shareLink = json['share_link'];
shareMini = json['share_mini'];
editTemplate = GoodsShareTempEditorModel.fromJson(
Map<String, dynamic>.from(json['edit_template']));
if (json['edit_template'] != null) {
editTemplate = GoodsShareTempEditorModel.fromJson(
Map<String, dynamic>.from(json['edit_template']));
}
}

Map<String, dynamic> toJson() {
@@ -49,8 +47,6 @@ class GoodsShareStyleModel {
data['reward_image'] = this.rewardImage;
data['reward_text'] = this.rewardText;
data['share_image'] = this.shareImage;
data['share_link'] = this.shareLink;
data['share_mini'] = this.shareMini;
if (this.editTemplate != null) {
data['edit_template'] = this.editTemplate.toJson();
}


+ 31
- 2
lib/pages/goods_share_page/models/goods_share_temp_add_model.dart 查看文件

@@ -3,7 +3,16 @@ class GoodsShareTempDataModel {
List<GoodsShareTempAddModel> shareTemplate;
String shareTip;
String appUrl;
String title;
String content;
String appName;
String appLogo;
String imgUrl;

String miniAppTitle;
String miniAppUrl;
String miniAppCode;
String miniAppDesc;

GoodsShareTempDataModel(
{this.shareContent,
@@ -13,7 +22,7 @@ class GoodsShareTempDataModel {
this.miniAppUrl});

GoodsShareTempDataModel.fromJson(Map<String, dynamic> json) {
shareContent = json['share_content'];
shareContent = json['template_content'];
if (json['share_template'] != null) {
shareTemplate = new List<GoodsShareTempAddModel>();
json['share_template'].forEach((v) {
@@ -23,18 +32,38 @@ class GoodsShareTempDataModel {
shareTip = json['share_tip'];
appUrl = json['app_url'];
miniAppUrl = json['mini_app_url'];
title = json['title'];
content = json['content'];
appName = json['app_name'];
appLogo = json['app_logo'];
miniAppTitle = json['mini_app_title'];
miniAppUrl = json['mini_app_url'];
miniAppCode = json['mini_app_code'];
miniAppDesc = json['mini_app_desc'];
imgUrl = json['image_url'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['share_content'] = this.shareContent;
if (this.shareTemplate != null) {
data['share_template'] =
data['template_content'] =
this.shareTemplate.map((v) => v.toJson()).toList();
}
data['share_tip'] = this.shareTip;
data['app_url'] = this.appUrl;
data['mini_app_url'] = this.miniAppUrl;

data['title'] = this.title;
data['content'] = this.content;
data['app_name'] = this.appName;
data['app_logo'] = this.appLogo;
data['image_url'] = this.imgUrl;

data['mini_app_title'] = this.miniAppTitle;
data['mini_app_url'] = this.miniAppUrl;
data['mini_app_code'] = this.miniAppCode;
data['mini_app_desc'] = this.miniAppDesc;
return data;
}
}


+ 8
- 2
lib/pages/goods_share_page/widgets/goods_share_link_widget.dart 查看文件

@@ -1,3 +1,4 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';

class GoodsShareLinkWidget extends StatelessWidget {
@@ -45,7 +46,10 @@ class GoodsShareLinkWidget extends StatelessWidget {
Container(
width: 48,
height: 48,
color: Colors.redAccent,
margin: EdgeInsets.only(left: 8),
child: CachedNetworkImage(
imageUrl: imgGoods,
),
)
],
),
@@ -61,7 +65,9 @@ class GoodsShareLinkWidget extends StatelessWidget {
margin: EdgeInsets.only(right: 6),
width: 15,
height: 15,
color: Colors.redAccent,
child: CachedNetworkImage(
imageUrl: icon,
),
),
Text(
name,


+ 8
- 3
lib/pages/goods_share_page/widgets/goods_share_miniprogram_widget.dart 查看文件

@@ -1,3 +1,4 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';

class GoodsShareMiniprogramWidget extends StatelessWidget {
@@ -26,7 +27,9 @@ class GoodsShareMiniprogramWidget extends StatelessWidget {
margin: EdgeInsets.only(right: 6),
width: 15,
height: 15,
color: Colors.redAccent,
child: CachedNetworkImage(
imageUrl: icon,
),
),
Text(
name,
@@ -47,7 +50,9 @@ class GoodsShareMiniprogramWidget extends StatelessWidget {
margin: EdgeInsets.only(top: 10, bottom: 10),
width: double.infinity,
height: 180,
color: Colors.redAccent,
child: CachedNetworkImage(
imageUrl: imgGoods,
),
),
Row(
children: <Widget>[
@@ -55,7 +60,7 @@ class GoodsShareMiniprogramWidget extends StatelessWidget {
margin: EdgeInsets.only(right: 6),
width: 15,
height: 15,
color: Colors.redAccent,
// color: Colors.redAccent,
),
Text(
'小程序',


+ 1
- 1
lib/pages/orders_page/views/order_tabbar_widget.dart 查看文件

@@ -29,7 +29,7 @@ class OrderTabbarWidget extends StatelessWidget {
Expanded(
child: TabBar(
controller: controller,
isScrollable: true,
isScrollable: false,
indicatorSize: TabBarIndicatorSize.label,
// tabs: widgets,
indicatorColor:


Loading…
取消
儲存