Commit 4d3de1dbaa7f93613b80ddf9ca9660b703f77447

Authored by wdn127929
1 parent 09cbd6bb

客情编辑纪念日接口字段调整

... ... @@ -532,7 +532,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5161;
CURRENT_PROJECT_VERSION = 5181;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -547,7 +547,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 5.1.6;
MARKETING_VERSION = 5.1.8;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -678,7 +678,7 @@
CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5161;
CURRENT_PROJECT_VERSION = 5181;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -693,7 +693,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 5.1.6;
MARKETING_VERSION = 5.1.8;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -714,7 +714,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5161;
CURRENT_PROJECT_VERSION = 5181;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -729,7 +729,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 5.1.6;
MARKETING_VERSION = 5.1.8;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ...
... ... @@ -174,8 +174,17 @@ class Cday extends Object {
@JsonKey(name: 'dtime')
String dtime;
@JsonKey(name: 'year')
String year;
@JsonKey(name: 'month')
String month;
@JsonKey(name: 'day')
String day;
Cday(this.id, this.gid, this.content, this.cdate, this.desc, this.type,
this.dtime);
this.dtime, this.year, this.month, this.day);
factory Cday.fromJson(Map<String, dynamic> srcJson) =>
_$CdayFromJson(srcJson);
... ...
... ... @@ -109,6 +109,9 @@ Cday _$CdayFromJson(Map<String, dynamic> json) {
json['desc'] as String,
json['type'] as String,
json['dtime'] as String,
json['year'] as String,
json['month'] as String,
json['day'] as String,
);
}
... ... @@ -120,6 +123,9 @@ Map<String, dynamic> _$CdayToJson(Cday instance) => <String, dynamic>{
'desc': instance.cdate,
'type': instance.cdate,
'dtime': instance.cdate,
'year': instance.year,
'month': instance.month,
'day': instance.day,
};
Last _$LastFromJson(Map<String, dynamic> json) {
... ...
... ... @@ -3043,66 +3043,54 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
.rnameStr,
textColor: MyColours
.color_515151),
(detailEntity.status == "4" &&
(detailEntity.status ==
"4" &&
detailEntity
.cancel !=
null &&
(detailEntity.phone ==
(detailEntity
.phone ==
null ||
detailEntity.phone ==
detailEntity
.phone ==
''))
? SizedBox()
: InkWell(
onTap: () {
if (formatPhone !=
null &&
formatPhone !=
'') {
if (Utils.getAuthority(
context,
'订座详情-电话') ||
widget.uid ==
userModel
.user
.openid ||
(userModel
.user.role_name ==
'店长' &&
detailEntity.role_name !=
'管理员' &&
detailEntity.role_name !=
'店长')) {
DialogUtil
.goPhone(
formatPhone);
}
}
},
child: RowMultiText(
"电话",
detailEntity.phone ==
null
? ''
: (Utils.getAuthority(context, '订座详情-电话') ||
widget.uid ==
userModel
.user.openid ||
(userModel.user.role_name == '店长' &&
detailEntity.role_name !=
'管理员' &&
detailEntity.role_name !=
'店长'))
? detailEntity
.phone
: Utils.starPhone(detailEntity
.phone),
textColor: MyColours
.color_515151,
textColorR:
MyColours
.color_438E93,
imageName:
'phone_detail')),
: detailEntity.gid ==
null
? SizedBox()
: InkWell(
onTap: () {
if (formatPhone !=
null &&
formatPhone !=
'') {
if (Utils.getAuthority(
context,
'订座详情-电话') ||
widget.uid ==
userModel
.user.openid ||
(userModel.user.role_name == '店长' &&
detailEntity.role_name !=
'管理员' &&
detailEntity.role_name !=
'店长')) {
DialogUtil
.goPhone(
formatPhone);
}
}
},
child: RowMultiText(
"电话",
detailEntity.phone == null
? ''
: (Utils.getAuthority(context, '订座详情-电话') || widget.uid == userModel.user.openid || (userModel.user.role_name == '店长' && detailEntity.role_name != '管理员' && detailEntity.role_name != '店长'))
? detailEntity.phone
: Utils.starPhone(detailEntity.phone),
textColor: MyColours.color_515151,
textColorR: MyColours.color_438E93,
imageName: 'phone_detail')),
(detailEntity.status ==
"4" &&
detailEntity
... ...
... ... @@ -111,6 +111,8 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
Map<String, dynamic> dataSp = Map();
final XgFlutterPlugin tpush = new XgFlutterPlugin();
//实现监听
Future<dynamic> platformCallHandler(MethodCall call) async {
switch (call.method) {
... ... @@ -226,9 +228,9 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
create: (_) => CollectStoreProvider(), child: MyPage()),
)));
WidgetsBinding.instance.addPostFrameCallback((_) async {
bus.on('refresh_token', (arg) {
initPlatformState();
});
// bus.on('refresh_token', (arg) {
// initPlatformState();
// });
getSellerVersion();
initPlatformState();
... ... @@ -733,7 +735,9 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
//获取点击通知栏的自定义参数
_getIntent(Map param) async {
_clearBadge(() {});
// if (param != null) {
_clearBadge(() {});
// }
Map notifyParam = param;
if (Platform.isIOS && param != null) {
... ... @@ -961,11 +965,23 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
// App.sp.setBool("h_notification", true);
/// 开启DEBUG
XgFlutterPlugin().setEnableDebug(false);
tpush.setEnableDebug(false);
String token = await XgFlutterPlugin.xgToken;
print(token);
if (token != null && token.length > 0) {
userTokenInit(token);
}
/// 添加回调事件
XgFlutterPlugin().addEventHandler(
tpush.addEventHandler(
onRegisteredDeviceToken: (String msg) async {
// String token = await XgFlutterPlugin.xgToken;
// print(token);
// userTokenInit(token);
print("flutter onRegisteredDeviceToken: $msg");
},
onRegisteredDone: (String msg) async {
... ... @@ -984,11 +1000,13 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
LogUtil.v("注册成功:$token");
// Utils.showToast("注册成功:$token");
userTokenInit(token);
// XgFlutterPlugin().setAppBadge(0);
// Utils.showToast("注册成功:$token");
// tpush.setAppBadge(0);
}
},
unRegistered: (String msg) async {
print("flutter unRegistered: $msg");
// Utils.showToast(msg);
},
onReceiveNotificationResponse: (Map<String, dynamic> msg) async {
print("flutter onReceiveNotificationResponse $msg");
... ... @@ -1049,7 +1067,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
print("flutter xgPushDidSetBadge: $msg");
// /// 在此可设置应用角标
// XgFlutterPlugin().setAppBadge(0);
// tpush.setAppBadge(0);
},
xgPushDidBindWithIdentifier: (String msg) async {
print("flutter xgPushDidBindWithIdentifier: $msg");
... ... @@ -1297,53 +1315,47 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
if (xgCount > 5) return;
if (Platform.isAndroid) {
/// 设置OPPO AppKey 和 AppSecret
if (await XgFlutterPlugin().getXgAndroidApi().isOppoRom()) {
XgFlutterPlugin().getXgAndroidApi().enableOppoNotification();
XgFlutterPlugin().getXgAndroidApi().setOppoPushAppId(appId: "30260281");
XgFlutterPlugin()
if (await tpush.getXgAndroidApi().isOppoRom()) {
tpush.getXgAndroidApi().enableOppoNotification();
tpush.getXgAndroidApi().setOppoPushAppId(appId: "30260281");
tpush
.getXgAndroidApi()
.setOppoPushAppKey(appKey: "94d77d10e7bb4c60bcf18a84c8ca8bdd");
}
// 设置小米 AppID 和 AppKey。
if (await XgFlutterPlugin().getXgAndroidApi().isMiuiRom()) {
XgFlutterPlugin()
.getXgAndroidApi()
.setMiPushAppId(appId: "2882303761518639456");
XgFlutterPlugin()
.getXgAndroidApi()
.setMiPushAppKey(appKey: "5231863961456");
if (await tpush.getXgAndroidApi().isMiuiRom()) {
tpush.getXgAndroidApi().setMiPushAppId(appId: "2882303761518639456");
tpush.getXgAndroidApi().setMiPushAppKey(appKey: "5231863961456");
} else {
if (!await XgFlutterPlugin().getXgAndroidApi().isVivoRom()) {
XgFlutterPlugin()
.getXgAndroidApi()
.createNotificationChannelWithSound(
channelId: 'high_custom_8',
channelName: '新消息通知',
enableLights: true,
enableSound: true,
enableVibration: true,
soundFileName: 'tts_voice');
if (!await tpush.getXgAndroidApi().isVivoRom()) {
tpush.getXgAndroidApi().createNotificationChannelWithSound(
channelId: 'high_custom_8',
channelName: '新消息通知',
enableLights: true,
enableSound: true,
enableVibration: true,
soundFileName: 'tts_voice');
}
}
XgFlutterPlugin().getXgAndroidApi().enableOtherPush();
tpush.getXgAndroidApi().enableOtherPush();
}
/// 启动TPNS服务
LogUtil.v("register:${xgCount.toString()}");
XgFlutterPlugin().startXg("1600012876", "INUIMFK21WGH");
tpush.startXg("1600012876", "INUIMFK21WGH");
xgCount++;
}
void _addBadge() {
XgFlutterPlugin().setBadge(numPush);
XgFlutterPlugin().setAppBadge(numPush);
tpush.setBadge(numPush);
tpush.setAppBadge(numPush);
FlutterAppBadger.updateBadgeCount(numPush);
}
void _clearBadge(VoidCallback callback) async {
numPush = 0;
XgFlutterPlugin().setBadge(0);
XgFlutterPlugin().setAppBadge(0);
tpush.setBadge(0);
tpush.setAppBadge(0);
FlutterAppBadger.removeBadge();
callback();
}
... ... @@ -1871,7 +1883,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
super.dispose();
LogUtil.v("home_dispose");
bus.off('refresh_token');
// bus.off('refresh_token');
if (timer != null) {
timer.cancel();
}
... ...
... ... @@ -71,9 +71,9 @@ class _CompleteCreateStorePageState extends State<CompleteCreateStorePage> {
Map<String, dynamic> user; //= baseResp.data[0]["user"]
App.sp.setBool("accountLogin", false);
if (Platform.isIOS) {
XgFlutterPlugin().stopXg();
}
// if (Platform.isIOS) {
// // XgFlutterPlugin().stopXg();
// }
if (App.sp.containsKey('table_list')) {
//退出清空桌位数据
App.sp.remove('table_list');
... ... @@ -99,7 +99,7 @@ class _CompleteCreateStorePageState extends State<CompleteCreateStorePage> {
bus.emit('refresh_token');
// bus.emit('refresh_token');
Map<String, dynamic> userMap = {
"sellerimage": seller['seller_image'],
... ...
... ... @@ -140,9 +140,9 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
_loginStore(context, CheckSellerAccSunModel sunModel) {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
App.sp.setBool("accountLogin", false);
if (Platform.isIOS) {
XgFlutterPlugin().stopXg();
}
// if (Platform.isIOS) {
// // XgFlutterPlugin().stopXg();
// }
if (App.sp.containsKey('table_list')) {
//退出清空桌位数据
App.sp.remove('table_list');
... ... @@ -164,7 +164,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
//退出清空订单发短信2分钟限制数据缓存
App.sp.remove('notebook_timer');
}
bus.emit('refresh_token');
// bus.emit('refresh_token');
Map<String, dynamic> seller = sunModel.toJson();
Map<String, dynamic> userMap = {
"openid": seller['uid'],
... ...
... ... @@ -883,13 +883,32 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
.guestInfoSunModel.guest.cDay[index];
String show = cday.content;
if (cday.desc != null && cday.desc != '') {
//新数据
// 组展示文本
if (cday.month != null) {
//最新的数据
show = cday.desc +
':' +
cday.dtime +
(cday.type == '1' ? '公历' : '农历');
if (cday.year == null) {
show = cday.desc +
':' +
cday.month +
'-' +
cday.day +
(cday.type == '1' ? '(公历)' : '(农历)');
} else {
show = cday.desc +
':' +
cday.year +
'-' +
cday.month +
'-' +
cday.day +
(cday.type == '1' ? '(公历)' : '(农历)');
}
} else {
show = cday.desc +
':' +
cday.dtime +
(cday.type == '1' ? '(公历)' : '(农历)');
}
}
return Center(
child: Padding(
... ...
... ... @@ -49,7 +49,13 @@ class _MyFestivalEditPageState extends State<MyFestivalEditPage> {
'desc': content['desc'],
'type': content['type'],
'dtime': content['dtime'],
'month': content['month'],
'day': content['day']
};
if (content['year'] != '') {
params['year'] = content['year'];
}
if (id != '') {
params["id"] = id;
}
... ... @@ -124,10 +130,32 @@ class _MyFestivalEditPageState extends State<MyFestivalEditPage> {
//新数据
// 组展示文本
show = cday.desc +
':' +
cday.dtime +
(cday.type == '1' ? '(公历)' : '(农历)');
if (cday.month != null) {
//最新的数据
if (cday.year == null) {
show = cday.desc +
':' +
cday.month +
'-' +
cday.day +
(cday.type == '1' ? '(公历)' : '(农历)');
} else {
show = cday.desc +
':' +
cday.year +
'-' +
cday.month +
'-' +
cday.day +
(cday.type == '1' ? '(公历)' : '(农历)');
}
} else {
show = cday.desc +
':' +
cday.dtime +
(cday.type == '1' ? '(公历)' : '(农历)');
}
}
return InkWell(
onTap: () {
... ... @@ -148,30 +176,39 @@ class _MyFestivalEditPageState extends State<MyFestivalEditPage> {
// str += '(${gongli ? '公历' : '农历'})';
if (cday.desc != null && cday.desc != '') {
//新数据
content = cday.desc;
List<String> ymd = cday.dtime.split('-');
if (ymd.length == 3) {
//含有年
yearStr = ymd[0];
monthStr = ymd[1];
dayStr = ymd[2];
} else if (ymd.length == 2) {
//没有年
monthStr = ymd[0];
dayStr = ymd[1];
}
if (cday.month != null) {
//最新的数据
if (monthStr.startsWith('0')) {
monthStr =
monthStr.substring(1, monthStr.length);
}
if (dayStr.startsWith('0')) {
dayStr = dayStr.substring(1, dayStr.length);
}
yearStr = cday.year ?? '选填';
monthStr = cday.month;
dayStr = cday.day;
} else {
//新数据
print(monthStr);
print(dayStr);
List<String> ymd = cday.dtime.split('-');
if (ymd.length == 3) {
//含有年
yearStr = ymd[0];
monthStr = ymd[1];
dayStr = ymd[2];
} else if (ymd.length == 2) {
//没有年
monthStr = ymd[0];
dayStr = ymd[1];
}
if (monthStr.startsWith('0')) {
monthStr =
monthStr.substring(1, monthStr.length);
}
if (dayStr.startsWith('0')) {
dayStr = dayStr.substring(1, dayStr.length);
}
print(monthStr);
print(dayStr);
}
gongli = cday.type == '1' ? true : false;
} else {
... ...
... ... @@ -893,15 +893,33 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
Cday cday = customerProvider
.guestInfoSunModel.guest.cDay[index];
String show = cday.content;
if (cday.content == null) {
//新数据
// 组展示文本
if (cday.desc != null && cday.desc != '') {
if (cday.month != null) {
//最新的数据
show =
cday.desc + ':' + cday.dtime +( cday.type ==
'1'
? '(公历)'
: '(农历)');
if (cday.year == null) {
show = cday.desc +
':' +
cday.month +
'-' +
cday.day +
(cday.type == '1' ? '(公历)' : '(农历)');
} else {
show = cday.desc +
':' +
cday.year +
'-' +
cday.month +
'-' +
cday.day +
(cday.type == '1' ? '(公历)' : '(农历)');
}
} else {
show = cday.desc +
':' +
cday.dtime +
(cday.type == '1' ? '(公历)' : '(农历)');
}
}
return Center(
child: Padding(
... ...
... ... @@ -49,8 +49,14 @@ class _FestivalEditPageState extends State<FestivalEditPage> {
'desc': content['desc'],
'type': content['type'],
'dtime': content['dtime'],
'month': content['month'],
'day': content['day']
};
if (content['year'] != '') {
params['year'] = content['year'];
}
if (id != '') {
params["id"] = id;
}
... ... @@ -125,10 +131,32 @@ class _FestivalEditPageState extends State<FestivalEditPage> {
//新数据
// 组展示文本
show = cday.desc +
':' +
cday.dtime +
(cday.type == '1' ? '(公历)' : '(农历)');
if (cday.month != null) {
//最新的数据
if (cday.year == null) {
show = cday.desc +
':' +
cday.month +
'-' +
cday.day +
(cday.type == '1' ? '(公历)' : '(农历)');
} else {
show = cday.desc +
':' +
cday.year +
'-' +
cday.month +
'-' +
cday.day +
(cday.type == '1' ? '(公历)' : '(农历)');
}
} else {
show = cday.desc +
':' +
cday.dtime +
(cday.type == '1' ? '(公历)' : '(农历)');
}
}
return InkWell(
onTap: () {
... ... @@ -149,30 +177,39 @@ class _FestivalEditPageState extends State<FestivalEditPage> {
// str += '(${gongli ? '公历' : '农历'})';
if (cday.desc != null && cday.desc != '') {
//新数据
content = cday.desc;
List<String> ymd = cday.dtime.split('-');
if (ymd.length == 3) {
//含有年
yearStr = ymd[0];
monthStr = ymd[1];
dayStr = ymd[2];
} else if (ymd.length == 2) {
//没有年
monthStr = ymd[0];
dayStr = ymd[1];
}
if (cday.month != null) {
//最新的数据
if (monthStr.startsWith('0')) {
monthStr =
monthStr.substring(1, monthStr.length);
}
if (dayStr.startsWith('0')) {
dayStr = dayStr.substring(1, dayStr.length);
}
yearStr = cday.year ?? '选填';
monthStr = cday.month;
dayStr = cday.day;
} else {
//新数据
print(monthStr);
print(dayStr);
List<String> ymd = cday.dtime.split('-');
if (ymd.length == 3) {
//含有年
yearStr = ymd[0];
monthStr = ymd[1];
dayStr = ymd[2];
} else if (ymd.length == 2) {
//没有年
monthStr = ymd[0];
dayStr = ymd[1];
}
if (monthStr.startsWith('0')) {
monthStr =
monthStr.substring(1, monthStr.length);
}
if (dayStr.startsWith('0')) {
dayStr = dayStr.substring(1, dayStr.length);
}
print(monthStr);
print(dayStr);
}
gongli = cday.type == '1' ? true : false;
} else {
... ...
... ... @@ -354,9 +354,9 @@ class UserModel with ChangeNotifier {
if (baseResp.code != Constant.status_success) {
Utils.showToast(baseResp.msg ?? "退出登录失败,请稍后重试");
} else {
if (Platform.isIOS) {
XgFlutterPlugin().stopXg();
}
// if (Platform.isIOS) {
// // XgFlutterPlugin().stopXg();
// }
if (App.sp.containsKey('unionid')) {
//微信登陆的时候,退出清空数据
App.sp.remove('openid');
... ...
... ... @@ -8679,7 +8679,14 @@ class DialogUtil {
rCallback({
'desc': name,
'type': gongli ? '1' : '2',
'dtime': str
'dtime': str,
'year': (yearStr != '' &&
yearStr != null &&
yearStr != '选填')
? yearStr
: '',
'month': monthStr,
'day': dayStr
});
},
),
... ...