购买和用户进入通知

master
laiiihz 5 years ago
parent d6eccd3ce3
commit 15f5336110

@ -514,4 +514,7 @@ class LiveAPI {
///
static const String report = '/v1/live/live/report/submit';
///
static const String buyGoodsInform = '/v1/live/live/im/buy_goods';
}

@ -192,6 +192,7 @@ class _LiveBlurPageState extends State<LiveBlurPage> {
),
rHBox(55),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
_buildColumn('${widget.look}', '观看人数'),
_buildColumn('${widget.praise}', '获赞'),

@ -508,6 +508,33 @@ class _LivePageState extends State<LivePage> {
break;
case ListenerTypeEnum.GroupTips:
if (params is String) {
dynamic parseParams = jsonDecode(params);
if (parseParams['tipsType'] == 'Join') {
showToastWidget(
Container(
margin: EdgeInsets.all(rSize(15)),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: rSize(10)),
height: rSize(26),
decoration: BoxDecoration(
color: Color(0xFFDC5353),
borderRadius: BorderRadius.circular(rSize(13)),
),
child: Text(
'${parseParams['opUser']}来了',
style: TextStyle(
color: Colors.white,
fontSize: rSP(13),
),
),
),
position: ToastPosition.top,
);
} else if (parseParams['tipsType'] == 'Quit') {
//exit
}
}
break;
case ListenerTypeEnum.RecvReceipt:
break;

@ -121,6 +121,28 @@ class _LiveStreamViewPageState extends State<LiveStreamViewPage> {
print(customParams);
dynamic data = customParams['data'];
switch (customParams['type']) {
case 'BuyGoods':
showToastWidget(
Container(
margin: EdgeInsets.all(rSize(15)),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: rSize(10)),
height: rSize(26),
decoration: BoxDecoration(
color: Color(0xFFF4BC22),
borderRadius: BorderRadius.circular(rSize(13)),
),
child: Text(
'${customParams['data']['content']}',
style: TextStyle(
color: Colors.white,
fontSize: rSP(13),
),
),
),
position: ToastPosition.top,
);
break;
case 'UnExplain':
setState(() {
showDetailWindow = false;
@ -164,7 +186,30 @@ class _LiveStreamViewPageState extends State<LiveStreamViewPage> {
case ListenerTypeEnum.GroupTips:
if (params is String) {
dynamic parseParams = jsonDecode(params);
print(parseParams['tipsType']);
if (parseParams['tipsType'] == 'Join') {
showToastWidget(
Container(
margin: EdgeInsets.all(rSize(15)),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: rSize(10)),
height: rSize(26),
decoration: BoxDecoration(
color: Color(0xFFDC5353),
borderRadius: BorderRadius.circular(rSize(13)),
),
child: Text(
'${parseParams['opUser']}来了',
style: TextStyle(
color: Colors.white,
fontSize: rSP(13),
),
),
),
position: ToastPosition.top,
);
} else if (parseParams['tipsType'] == 'Quit') {
//exit
}
}
break;

@ -361,6 +361,10 @@ class _GoodsListDialogState extends State<GoodsListDialog> {
model.id,
));
else {
HttpManager.post(LiveAPI.buyGoodsInform, {
"liveItemId": widget.id,
"goodsId": model.id,
});
showModalBottomSheet(
context: context,
builder: (context) {

Loading…
Cancel
Save