Browse Source

图片更改

ff_new
w-R 3 years ago
parent
commit
4959dd0626
  1. 4
      lib/community/community_view/community_dynamic.dart
  2. 2
      lib/community/release_dynamic.dart
  3. 8
      lib/retrofit/min_api.dart
  4. 2
      lib/retrofit/min_api.g.dart
  5. 8
      lib/retrofit/retrofit_api.dart
  6. 2
      lib/retrofit/retrofit_api.g.dart
  7. 17
      lib/view_widget/custom_image.dart

4
lib/community/community_view/community_dynamic.dart

@ -185,7 +185,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
}, },
child: child:
MImage( MImage(
(widget?.article?.authorHeadImg ?? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg") + "?imageView2/1/w/200/h/200/format/jpg/q/75", (widget?.article?.authorHeadImg ?? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg"),
width: 44, width: 44,
height: 44, height: 44,
isCircle: true, isCircle: true,
@ -372,7 +372,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
fit: BoxFit.contain, fit: BoxFit.contain,
radius: BorderRadius.circular(2), radius: BorderRadius.circular(2),
width: MediaQuery.of(context).size.width/1.5, width: MediaQuery.of(context).size.width/1.5,
height:MediaQuery.of(context).size.width, height:MediaQuery.of(context).size.width/1.5,
errorSrc: "assets/image/default_2_1.png", errorSrc: "assets/image/default_2_1.png",
fadeSrc: "assets/image/default_2_1.png", fadeSrc: "assets/image/default_2_1.png",
)), )),

2
lib/community/release_dynamic.dart

@ -110,7 +110,7 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
fontSize: 14.sp, fontSize: 14.sp,
color: Colors.black, color: Color(0xFFA0A0A0),
), ),
),) ),)
], ],

8
lib/retrofit/min_api.dart

@ -21,15 +21,15 @@ import 'data/shoppingCart.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
// const base_url = "https://pos.api.lotus-wallet.com/app/"; /// const base_url = "https://pos.api.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.api.lotus-wallet.com/app/"; /// const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///
// const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8765/app/";/// // const base_url = "http://192.168.10.236:8765/app/";///
const baseUrl = "http://192.168.10.236:8765/app/";/// // const baseUrl = "http://192.168.10.236:8765/app/";///
// const base_url = "http://192.168.10.142:8765/app/";/// // const base_url = "http://192.168.10.142:8765/app/";///

2
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService { class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) { _MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8765/app/'; baseUrl ??= 'https://pos.api.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

8
lib/retrofit/retrofit_api.dart

@ -54,14 +54,14 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; /// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; /// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8766/app/"; /// // const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; /// // const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.159:8766/app/"; /// // const base_url = "http://192.168.10.159:8766/app/"; ///
// const baseUrl = "http://192.168.10.159:8766/app/"; /// // const baseUrl = "http://192.168.10.159:8766/app/"; ///

2
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService { class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) { _ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.142:8766/app/'; baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

17
lib/view_widget/custom_image.dart

@ -35,14 +35,19 @@ class MImage extends StatelessWidget {
builder: (context, constraints) { builder: (context, constraints) {
String imageUrl = ""; String imageUrl = "";
/// ///
if (src != null && src != "" && src.startsWith("http")) { // if (src != null && src != "" && src.startsWith("http")) {
String oper = src.contains("?") ? "" :"?"; // String oper = src.contains("?") ? "" :"?";
imageUrl = // imageUrl =
"$src$oper/imageMogr2/thumbnail/${constraints.constrainWidth() * scaleIndex}" // "$src$oper/imageMogr2/thumbnail/${constraints.constrainWidth() * scaleIndex}"
"x${constraints.constrainHeight() * scaleIndex}/format/webp/quality/100"; // "x${constraints.constrainHeight() * scaleIndex}/format/webp/quality/100";
// }
///
if (src != "" && src.startsWith("http")) {
imageUrl = "$src?imageView2/1/w/${(constraints.constrainWidth() * scaleIndex).toInt()}/h/${(constraints.constrainHeight() * scaleIndex).toInt()}/format/jpg/q/75";
} }
// print(imageUrl); // print("imageUrl:$imageUrl");
// print("constrainWidth: ${constraints.constrainWidth()}"); // print("constrainWidth: ${constraints.constrainWidth()}");
// print("constrainHeight: ${constraints.constrainHeight()}"); // print("constrainHeight: ${constraints.constrainHeight()}");

Loading…
Cancel
Save