代码提交

This commit is contained in:
CYH 2026-01-20 23:26:38 +08:00
parent b715925219
commit 2982bd7654
18 changed files with 197 additions and 152 deletions

View File

@ -71,8 +71,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode 285
versionName "2.8.5"
versionCode 289
versionName "2.8.9"
manifestPlaceholders = [
vivo_APPID: "105669716",
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",

View File

@ -501,7 +501,7 @@ class _TIMTextFieldLayoutNarrowState
ChatGiftPannel(
accid: widget.conversationID,
),
isScrollControlled: false,
isScrollControlled: true,
enableDrag: false,
);
}
@ -951,6 +951,7 @@ class _TIMTextFieldLayoutNarrowState
showOKToast(reulst1['msg']);
}
}),
if ((Get.find<HomeLogic>().model?.canMakeWish ?? 0) == 1)
chatActionWidget('wish', '许个愿', () {
Get.bottomSheet(
WishDialog(

View File

@ -94,129 +94,124 @@ class _ChatGiftPannelState extends State<ChatGiftPannel>
),
),
),
),
Container(
child: SafeArea(
top: false,
bottom: false,
child: Container(
decoration: BoxDecoration(
color: Color(0xFF423055),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(
16.sp,
),
topRight: Radius.circular(16.sp))),
width: Get.width,
height: 370.sp,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
),Container(
decoration: BoxDecoration(
color: Color(0xFF423055),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(
16.sp,
),
topRight: Radius.circular(16.sp))),
width: Get.width,
height: 450.sp,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 5.sp,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(
height: 5.sp,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
height: 30.sp,
width: widget.isShowVip ? 120.sp : 60.sp,
margin: EdgeInsets.only(
left: 5.sp,
),
child: TabBar(
isScrollable: false,
automaticIndicatorColorAdjustment: false,
labelPadding:
EdgeInsets.symmetric(horizontal: 4.0.sp),
physics: NeverScrollableScrollPhysics(),
indicatorColor: widget.isShowVip
? AppColor.mainColor
: Colors.transparent,
indicatorSize: TabBarIndicatorSize.label,
unselectedLabelStyle: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w500,
),
unselectedLabelColor: Color(0xB3FFFFFF),
labelColor: AppColor.mainColor,
labelStyle: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w500),
controller: tabController,
tabs: widget.isShowVip
? <Widget>[
Tab(
text: '礼物',
),
Tab(
text: '会员',
),
]
: <Widget>[
Tab(
text: '礼物',
)
],
),
Container(
height: 30.sp,
width: widget.isShowVip ? 120.sp : 60.sp,
margin: EdgeInsets.only(
left: 5.sp,
),
child: TabBar(
isScrollable: false,
automaticIndicatorColorAdjustment: false,
labelPadding:
EdgeInsets.symmetric(horizontal: 4.0.sp),
physics: NeverScrollableScrollPhysics(),
indicatorColor: widget.isShowVip
? AppColor.mainColor
: Colors.transparent,
indicatorSize: TabBarIndicatorSize.label,
unselectedLabelStyle: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w500,
),
tabController.index == 0 && widget.isShowVip
? Container(
margin: EdgeInsets.only(right: 15.sp),
child: InkWell(
onTap: () {
String toUserId =
widget.accid!.split('_').last;
Get.toNamed(Routes.GiftShopPage,
arguments: '',preventDuplicates: true);
},
child: Container(
height: 22.sp,
width: 62.sp,
decoration: BoxDecoration(
gradient: AppColor
.mainVerLinearGradient,
borderRadius:
BorderRadius.circular(11.sp)),
child: Stack(
alignment: Alignment.center,
children: [
Container(
height: 20.sp,
width: 60.sp,
decoration: BoxDecoration(
color: Color(0xFF423055),
borderRadius:
BorderRadius.circular(
10.sp))),
Text(
'礼物馆',
style: TextStyle(
color: Colors.white,
fontSize: 14.sp),
)
],
),
)),
)
: Container()
],
unselectedLabelColor: Color(0xB3FFFFFF),
labelColor: AppColor.mainColor,
labelStyle: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w500),
controller: tabController,
tabs: widget.isShowVip
? <Widget>[
Tab(
text: '礼物',
),
Tab(
text: '会员',
),
]
: <Widget>[
Tab(
text: '礼物',
)
],
),
),
Expanded(
child: TabBarView(
controller: tabController,
children: [
Gift(widget.accid, widget.giftId),
if (widget.isShowVip)
PartnerOption(accid: widget.accid),
],
))
tabController.index == 0 && widget.isShowVip
? Container(
margin: EdgeInsets.only(right: 15.sp),
child: InkWell(
onTap: () {
String toUserId =
widget.accid!.split('_').last;
Get.toNamed(Routes.GiftShopPage,
arguments: '',preventDuplicates: true);
},
child: Container(
height: 22.sp,
width: 98.sp,
decoration: BoxDecoration(
gradient: AppColor
.mainVerLinearGradient,
borderRadius:
BorderRadius.circular(11.sp)),
child: Stack(
alignment: Alignment.center,
children: [
Container(
height: 20.sp,
width: 96.sp,
decoration: BoxDecoration(
color: Color(0xFF423055),
borderRadius:
BorderRadius.circular(
10.sp))),
Text(
'🎁点亮礼物馆',
style: TextStyle(
color: Colors.white,
fontSize: 14.sp),
)
],
),
)),
)
: Container()
],
),
)),
),
Expanded(
child: TabBarView(
controller: tabController,
children: [
Gift(widget.accid, widget.giftId),
if (widget.isShowVip)
PartnerOption(accid: widget.accid),
],
))
],
),
),
Container(
height: MediaQuery.of(context).padding.bottom,
decoration: BoxDecoration(

View File

@ -81,6 +81,7 @@ class _GiftState extends State<Gift> {
@override
Widget build(BuildContext context) {
return Stack(
fit: StackFit.expand,
children: [
Container(
color: Colors.transparent,
@ -103,6 +104,7 @@ class _GiftState extends State<Gift> {
Expanded(
child: Container(
width: Get.width,
// color: Colors.red,
child: giftList.isNotEmpty ? giftGridWidget(giftList) : Container()
)),
Container(

View File

@ -24,7 +24,7 @@ class PartnerOption extends StatefulWidget {
class _PartnerOptionState extends State<PartnerOption> {
// TODO: add state variables and methods
List<PriceBean> priceBean = [];
bool isZfbPrice = true;
bool isZfbPrice = false;
List<String> vipName = [
"vip_year",
"vip_quarter",
@ -184,11 +184,11 @@ class _PartnerOptionState extends State<PartnerOption> {
),
),
SizedBox(width: 4.0.sp),
Image.asset(
getMineImage('icon_recommend_pay_way'),
width: 32.0.sp,
height: 16.0.sp,
),
// Image.asset(
// getMineImage('icon_recommend_pay_way'),
// width: 32.0.sp,
// height: 16.0.sp,
// ),
],
),
),

View File

@ -14,7 +14,6 @@ import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:geolocator/geolocator.dart';
import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import '../../commons/Widgets/base_tip_widget.dart';
import '../../commons/Widgets/open_vip_tip/view.dart';
@ -163,7 +162,7 @@ class CircleLogic extends GetxController {
await loadNewUserIsShowData();
loadCircleListData();
loadCirclePeopleData();
await initGerder();
// await initGerder();
getCityList();
getBanner();
// getNearByList();
@ -199,7 +198,7 @@ class CircleLogic extends GetxController {
loadData() {
loadCircleListData();
loadCirclePeopleData();
initGerder();
// initGerder();
getCityList();
}
@ -280,32 +279,52 @@ class CircleLogic extends GetxController {
configBean.genderMap.forEach((key, value) {
if (int.parse(key) < 3) {
genderList.add(MyConfigData(key, value, true));
genderList.add(MyConfigData(key, value, false));
dis_genderList.add(MyConfigData(key, value, false));
new_genderList.add(MyConfigData(key, value, true));
}
});
//
configBean.roleMap.forEach((key, value) {
allRoleList.add(value);
});
genderList.add(MyConfigData('-1', '非二元', true));
genderList.add(MyConfigData('-1', '非二元', false));
dis_genderList.add(MyConfigData('-1', '非二元', false));
new_genderList.add(MyConfigData('-1', '非二元', true));
// if (userInfoBea!.orientations.isNotEmpty) {
// dis_genderList[0].isSelect = false;
// if (userInfoBea!.orientations!.contains(1)) {
// dis_genderList[1].isSelect = true;
// }
// if (userInfoBea!.orientations!.contains(2)) {
// dis_genderList[2].isSelect = true;
// }
// userInfoBea!.orientations.forEach((element) {
// if (element > 2) {
// dis_genderList[3].isSelect = true;
// }
// });
// }
bool isAll = false;
if (userInfoBea!.orientations!.length == 6) {
dis_genderList.forEach((element) {
genderList.forEach((element) {
element.isSelect = true;
});
} else {
dis_genderList[0].isSelect = false;
genderList[0].isSelect = false;
userInfoBea!.orientations.forEach((element) {
if (element == 1) {
dis_genderList[1].isSelect = true;
genderList[1].isSelect = true;
} else if (element == 2) {
dis_genderList[2].isSelect = true;
genderList[2].isSelect = true;
} else if (element > 2) {
dis_genderList[3].isSelect = true;
genderList[3].isSelect = true;
}
});
}
@ -553,6 +572,9 @@ class CircleLogic extends GetxController {
// getLocationPermission();
// _isLocationGranted = true;
// } else {
if (genderList.length == 1) {
await initGerder();
}
getNearByList();
// }
}
@ -672,7 +694,6 @@ class CircleLogic extends GetxController {
} else {
isLoadNearByList = false;
refreshController.loadComplete();
// getNearByList();
return;
}
}

View File

@ -194,7 +194,6 @@ class _CirclePageState extends State<CirclePage>
)),
SizedBox(width: 4.sp,),
Text(
// '1111',
formatCallOutContent(data['content'] ?? '') ,
style: TextStyle(
color: Colors.white,

View File

@ -33,6 +33,7 @@ class _VideoItemWidgetState extends State<VideoItemWidget> {
var data = await DioManager.instance.get(url: Api.signInterestCalloutDetail,params: {
'calloutId':widget.callOutId,
});
if (data['code'] == 200) {
WorldLists bean = WorldLists.fromJson(data['data']);
Get.to(

View File

@ -82,7 +82,7 @@ class Complete_materialLogic extends GetxController {
unLockWxNum = bean.data.unLockWxNum;
userInfoBean = bean.data.user;
state.wxEditingController.text = userInfoBean!.wx_num;
// state.wxEditingController.text = userInfoBean!.wx_num;
state.nickName = userInfoBean!.nickname;
state.sex = getGenderStr(userInfoBean!.gender);
state.genderId = userInfoBean!.gender.toString();
@ -494,9 +494,10 @@ class Complete_materialLogic extends GetxController {
Map<String,dynamic> params = {
"hideContact": wxInfo.containsKey('hideContact') ? wxInfo['hideContact'] : 0,
'contactType':contactType,
"contact": state.wxEditingController.text};
"contact": state.wxEditingController.text,
'type':2};
var result = await DioManager().postBody(url: Api.confset,params: params);
var result = await DioManager().postBody(url: Api.updateContact,params: params);
if (result['code'] == 10081) {
// showToast.
showOKToast(result['msg']);
@ -507,7 +508,19 @@ class Complete_materialLogic extends GetxController {
showOKToast(wxStatusInfo['32100']);
}
}
print(result);
} else {
Map<String,dynamic> params = {
"hideContact": 0,
'contactType':2,
"contact": state.wxEditingController.text,
'type':2};
var result = await DioManager().postBody(url: Api.updateContact,params: params);
if (result['code'] == 200) {
}
}
//TODO
// LatLng location = await getLocation();

View File

@ -21,6 +21,8 @@ import '../../../net/api.dart';
import '../../../utils/SharedPreferencesHelper.dart';
import 'state.dart';
final String channelStr = '';
class LoginLogic extends GetxController {
bool check = false;
final QuickpassFlutterPlugin quickLoginPlugin = new QuickpassFlutterPlugin();
@ -32,7 +34,7 @@ class LoginLogic extends GetxController {
bool isPhone = false;
String clipboardStr = '';
String source = '';
String source = channelStr;
bool isShowPwd = false;

View File

@ -201,7 +201,7 @@ class MinefragmentLogic extends GetxController {
if (result['code'] == 200) {
try {
List list = result['data'] ?? [];
List list = result['data']['babies'] ?? [];
if (list.isNotEmpty) {
isHaveBady = true;
update();
@ -694,6 +694,8 @@ class User {
String avatarThumb;
String? createTime;
int? avatarNonhuman;
int? canMakeWish;
int? canSetContact;
String email;
String phoneNum;
User({
@ -719,6 +721,8 @@ class User {
this.createTime,
required this.interests,
this.avatarNonhuman,
this.canMakeWish,
this.canSetContact,
});
factory User.fromJson(Map<String, dynamic> json) {
@ -748,6 +752,8 @@ class User {
lat: json['lat'],
city: json['city'],
avatarThumb: json['avatar_thumb'],
canMakeWish: json['canMakeWish'],
canSetContact: json['canSetContact'],
avatarNonhuman: json['avatarNonhuman']);
}
}

View File

@ -291,6 +291,7 @@ class _MinefragmentPageState extends State<MinefragmentPage>
),
),
Expanded(child: Container()),
if ((Get.find<HomeLogic>().model?.canSetContact ?? 0) == 1)
GestureDetector(
onTap: () async {
if (logic.myInfoBean!.contact.isNotEmpty) {

View File

@ -50,7 +50,7 @@ class My_master_or_babyLogic extends GetxController {
isLoad = false;
if (result['code'] == 200) {
List list = result['data'] ?? [];
List list = result['data']['babies'] ?? [];
if (page == 1) {
dataList = list;
if (dataList.isNotEmpty) {

View File

@ -601,7 +601,7 @@ class UserinfoLogic extends GetxController {
.get(url: Api.masterBabies, params: {'page': 1, 'page_size': 10});
if (result['code'] == 200) {
List list = result['data'] ?? [];
List list = result['data']['babies'] ?? [];
if (list.isNotEmpty) {
isHaveBady = true;
update();

View File

@ -170,7 +170,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
? "${logic.userInfoBean!.nickname}"
: "个人主页",
actionWdiget: logic.isMe
? GestureDetector(
? ((Get.find<HomeLogic>().model?.canSetContact ?? 0) != 1) ? Container() : GestureDetector(
onTap: () async {
if (logic.userInfoBean!.contact.isNotEmpty) {
showUpdateWxPicker();
@ -204,6 +204,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
),
),
),
Container(
width: 110.sp,
decoration: BoxDecoration(

View File

@ -38,7 +38,7 @@ class _SignInDialogState extends State<SignInDialog> {
// TODO: add widget build method
// "rewards" -> [_GrowableList]
List infoList = widget.configInfo['rewards'];
return GestureDetector(
return InkWell(
onTap: () {
Get.back();
},
@ -301,7 +301,7 @@ class _SignInDialogState extends State<SignInDialog> {
));
itemList.add(Container(
margin: EdgeInsets.only(left: 5.sp,right: 10.sp),
child: Text('+',style: TextStyle(color: Color(0xFFDC5BFD),fontSize: 25.sp,),),
child: Text('/',style: TextStyle(color: Color(0xFFDC5BFD),fontSize: 25.sp,),),
));
}
});

View File

@ -846,4 +846,7 @@ class Api {
//
static var provinceNearByUserList = '/user-service/nearby/province/queryNearByUserList';
//
static var updateContact = '/user-service/updateContact';
}

View File

@ -15,7 +15,7 @@ import 'package:connectivity/connectivity.dart';
// const String baseUrl = Api.baseUrl;
/// Dio
final String channelStr = '';
enum DioMethod {
get,
post,
@ -249,7 +249,7 @@ class DioManager {
'OsVersion': await getDeviceId(),
'Imei': await getImei(),
'Brand': await getBrand(),
// 'Channel':'channel4'
'Channel':channelStr
});
} else {
options = Options(method: methodValues[method], headers: {
@ -257,7 +257,7 @@ class DioManager {
'VersionName': await getVersionName(),
'VersionCode': await getVersionCode(),
'Platform': Platform.isIOS ? '1' : '0',
'Channel':'kuaishou'
'Channel':channelStr
});
}