添加商城示例
This commit is contained in:
parent
0fba9fcf75
commit
4ca79949ed
@ -202,6 +202,7 @@
|
||||
"videoIntercomDoorLock":"Video intercom door lock",
|
||||
"NFCPassiveLock":"NFC Passive Lock",
|
||||
"addDevice":"Add device",
|
||||
"shoppingCart":"Lock Mall",
|
||||
"gateway":"Gateway",
|
||||
"message":"Message",
|
||||
"supportStaff":"Support Staff",
|
||||
@ -473,7 +474,7 @@
|
||||
"openRight": "Open Right",
|
||||
"judgmentMethod": "Judgment Method:\n",
|
||||
"judgmentMethodContent": "The man stood outside the house, facing the entrance door. \nIf the hinge or shaft of the door is on the left, the door is left open; \nA door is right-open if its hinge or shaft is on the right. \nIf the setting is wrong, it will not open and close the door properly. \nRecommended to be operated by installation or maintenance personnel.",
|
||||
|
||||
|
||||
"customMode": "Custom mode",
|
||||
"videoSlot": "Video slot"
|
||||
}
|
||||
|
||||
@ -202,6 +202,7 @@
|
||||
"videoIntercomDoorLock":"videoIntercomDoorLock",
|
||||
"NFCPassiveLock":"NFCPassiveLock",
|
||||
"addDevice":"addDevice",
|
||||
"shoppingCart":"shoppingCart",
|
||||
"gateway":"gateway",
|
||||
"message":"message",
|
||||
"supportStaff":"supportStaff",
|
||||
@ -476,4 +477,4 @@
|
||||
|
||||
"customMode": "customMode",
|
||||
"videoSlot": "videoSlot"
|
||||
}
|
||||
}
|
||||
|
||||
@ -202,6 +202,7 @@
|
||||
"videoIntercomDoorLock":"可视对讲门锁",
|
||||
"NFCPassiveLock":"NFC无源锁",
|
||||
"addDevice":"添加设备",
|
||||
"shoppingCart":"配件商城",
|
||||
"gateway":"网关",
|
||||
"message":"消息",
|
||||
"supportStaff":"客服",
|
||||
@ -479,4 +480,4 @@
|
||||
|
||||
"customMode": "自定义模式",
|
||||
"videoSlot": "录像时段"
|
||||
}
|
||||
}
|
||||
|
||||
BIN
star_lock/images/mine/icon_mine_main_shoppingcart.png
Normal file
BIN
star_lock/images/mine/icon_mine_main_shoppingcart.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@ -144,6 +144,7 @@ import 'mine/gateway/addGateway/seletGatewayTypeNextTip/seletGatewayTypeNextTip_
|
||||
import 'mine/gateway/gatewayConnectionLock/gatewayConnectionLockList_page.dart';
|
||||
import 'mine/gateway/gatewayDetail/gatewayDetail_page.dart';
|
||||
import 'mine/gateway/gatewayList/gatewayList_page.dart';
|
||||
import 'mine/mall/mall_page.dart';
|
||||
import 'mine/message/messageList_page.dart';
|
||||
import 'mine/mine/starLockMine_page.dart';
|
||||
import 'mine/mineMultiLanguage/mineMultiLanguage_page.dart';
|
||||
@ -183,6 +184,7 @@ abstract class Routers {
|
||||
static const starLockMain = '/StarLockMain'; // 首页
|
||||
static const starLockMinePage = '/StarLockMinePage'; // 我的
|
||||
static const seletLockTypePage = '/SeletLockTypePage'; // 选择锁类型
|
||||
static const LockMallPage = '/LockMallPage'; // 商城页面
|
||||
static const addLockPage = '/AddLockPage'; // 选择锁类型
|
||||
static const nearbyLockPage = '/NearbyLockPage'; // 附近的锁
|
||||
static const lockAddressPage = '/LockAddressPage'; // 锁地址
|
||||
@ -436,6 +438,10 @@ abstract class AppRouters {
|
||||
name: Routers.seletLockTypePage,
|
||||
page: () => const SeletLockTypePage(),
|
||||
),
|
||||
GetPage(
|
||||
name: Routers.LockMallPage,
|
||||
page: () => const LockMallPage(),
|
||||
),
|
||||
GetPage(
|
||||
name: Routers.addLockPage,
|
||||
page: () => const AddLockPage(),
|
||||
|
||||
@ -3,7 +3,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/network/api.dart';
|
||||
|
||||
import '../../app_settings/app_colors.dart';
|
||||
import '../../tools/commonItem.dart';
|
||||
@ -68,6 +67,7 @@ class _AbountPageState extends State<AbountPage> {
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
print("用户协议${XSConstantMacro.userAgreementURL}");
|
||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||
arguments: {
|
||||
"url": XSConstantMacro.userAgreementURL,
|
||||
|
||||
50
star_lock/lib/mine/mall/mall_page.dart
Normal file
50
star_lock/lib/mine/mall/mall_page.dart
Normal file
@ -0,0 +1,50 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_colors.dart';
|
||||
import 'package:star_lock/tools/titleAppBar.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
||||
import '../../translations/trans_lib.dart';
|
||||
|
||||
class LockMallPage extends StatefulWidget {
|
||||
const LockMallPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LockMallPage> createState() => _LockMallPageState();
|
||||
}
|
||||
|
||||
class _LockMallPageState extends State<LockMallPage> {
|
||||
late WebViewController _webViewController;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
_webViewController = WebViewController()
|
||||
..setJavaScriptMode(JavaScriptMode.unrestricted);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// FIXME 如果未登录状态,应先跳转登录页
|
||||
// FIXME url应该使用接口获取,接口名称 “获取商城跳转地址:/mall/getUrl“ POST请求,无参数,需要登录
|
||||
String url = 'https://ge.mall.star-lock.cn/quick_login?id=4&key=1ffb9d37109b8351ebb04ccfcca02c8e';
|
||||
_webViewController.loadRequest(Uri.parse(url));
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: const Color(0xFFFFFFFF),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: getWebTitle(),
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
),
|
||||
body: WebViewWidget(controller: _webViewController));
|
||||
}
|
||||
|
||||
String getWebTitle() {
|
||||
String webTitleStr = TranslationLoader.lanKeys!.shoppingCart!.tr;
|
||||
_webViewController.getTitle().then((result) {
|
||||
webTitleStr = result!;
|
||||
});
|
||||
return webTitleStr;
|
||||
}
|
||||
}
|
||||
@ -147,6 +147,11 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
||||
Get.back();
|
||||
Get.toNamed(Routers.valueAddedServicesPage);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_shoppingcart.png',
|
||||
TranslationLoader.lanKeys!.shoppingCart!.tr, () {
|
||||
Get.back();
|
||||
Get.toNamed(Routers.LockMallPage);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_about.png',
|
||||
TranslationLoader.lanKeys!.about!.tr, () {
|
||||
Get.back();
|
||||
|
||||
@ -1,16 +1,11 @@
|
||||
abstract class Api {
|
||||
// static String baseAddress = "https://pre.lock.star-lock.cn:8093"; //预发布环境
|
||||
static String baseAddress = "http://192.168.56.101:8099"; //联调环境
|
||||
// static String baseAddress = "https://dev.lock.star-lock.cn"; //联调环境
|
||||
// static String baseAddress = "http://192.168.1.15:8022"; //谢总本地
|
||||
static String baseAddress = "https://ge.lock.star-lock.cn:8100"; //葛工开发环境地址
|
||||
|
||||
final String baseUrl = "$baseAddress/api";
|
||||
|
||||
// final String baseUrl = "http://test.lock.star-lock.cn/api"; // 葛工
|
||||
// final String baseUrl = "https://lock.star-lock.cn/api"; // 测试环境
|
||||
// final String baseUrl = "http://wenlin.lock.star-lock.cn/api"; //曾工
|
||||
// final String baseUrl = "http://192.168.56.101:8099/api"; //曾工本地
|
||||
// final String baseUrl = "http://192.168.1.14:8099/api"; //葛工开发环境地址
|
||||
|
||||
// 登录注册
|
||||
final String getVerificationCodeUrl = '/user/sendValidationCode';
|
||||
final String registerUrl = '/user/register';
|
||||
|
||||
@ -198,6 +198,7 @@ class LanKeyEntity {
|
||||
this.videoIntercomDoorLock,
|
||||
this.NFCPassiveLock,
|
||||
this.addDevice,
|
||||
this.shoppingCart,
|
||||
this.gateway,
|
||||
this.message,
|
||||
this.supportStaff,
|
||||
@ -661,6 +662,7 @@ class LanKeyEntity {
|
||||
videoIntercomDoorLock = json['videoIntercomDoorLock'];
|
||||
NFCPassiveLock = json['NFCPassiveLock'];
|
||||
addDevice = json['addDevice'];
|
||||
shoppingCart = json['shoppingCart'];
|
||||
gateway = json['gateway'];
|
||||
message = json['message'];
|
||||
supportStaff = json['supportStaff'];
|
||||
@ -1147,6 +1149,7 @@ class LanKeyEntity {
|
||||
String? videoIntercomDoorLock;
|
||||
String? NFCPassiveLock;
|
||||
String? addDevice;
|
||||
String? shoppingCart;
|
||||
String? gateway;
|
||||
String? message;
|
||||
String? supportStaff;
|
||||
@ -1629,6 +1632,7 @@ class LanKeyEntity {
|
||||
map['videoIntercomDoorLock'] = videoIntercomDoorLock;
|
||||
map['NFCPassiveLock'] = NFCPassiveLock;
|
||||
map['addDevice'] = addDevice;
|
||||
map['shoppingCart'] = shoppingCart;
|
||||
map['gateway'] = gateway;
|
||||
map['message'] = message;
|
||||
map['supportStaff'] = supportStaff;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user