hyzp_ybqx-Commit028:开始实现兴文县App。更换区县 APPkey后,登录成功: pdohxHyr79ddvzgE8ArwGaxb01bmCtJB
This commit is contained in:
@@ -41,6 +41,7 @@ import 'UserInfo.dart';
|
||||
// 3、修改文本变量
|
||||
// 位于文件 R:\FlutterProject\FlutterProject51-hyzp_ybqx\hyzp_ybqx\lib\components\commonFun.dart 中
|
||||
// 511501、宜宾市
|
||||
// String APPkey = 'ijddvzgEGaxbzsbmCtpdohxHyrAArwJB'; // 宜宾市APPkey
|
||||
// String service_tel = '\n服务热线:187-8467-8300';
|
||||
// String yibin_QuXian = '宜宾';
|
||||
// String copyright_info = '© ' + yibin_QuXian + '市生态环境局 四川省踏石科技有限公司 版权所有' + service_tel;
|
||||
@@ -75,6 +76,7 @@ const serviceUrl_ybqx = 'http://125.64.218.67:9909';
|
||||
|
||||
// 511528、兴文县
|
||||
int qxdm = 511528;
|
||||
String APPkey = 'pdohxHyr79ddvzgE8ArwGaxb01bmCtJB'; // 宜宾区县APPkey
|
||||
String service_tel = '\n服务热线:187-8467-8300';
|
||||
String yibin_QuXian = '宜宾市兴文';
|
||||
String copyright_info = '© ' + yibin_QuXian + '生态环境局 四川省踏石科技 版权所有' + service_tel;
|
||||
@@ -277,7 +279,7 @@ String RandomBit(int len) {
|
||||
|
||||
// sign=md5(ijddvzgEGaxbzsbmCtpdohxHyrAArwJB1003)
|
||||
// =3967eaebec0eed0642a1d395ac9293dd
|
||||
String APPkey = 'ijddvzgEGaxbzsbmCtpdohxHyrAArwJB';
|
||||
// String APPkey = 'ijddvzgEGaxbzsbmCtpdohxHyrAArwJB'; // 宜宾APPkey
|
||||
//Flutter对字符串进行MD5运算 发表于 2019-03-26 更新于 2020-12-04 分类于 Flutter 阅读次
|
||||
String GenerateMd5(String str) {
|
||||
var content = new Utf8Encoder().convert(str);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -10,11 +9,9 @@ import 'package:hyzp_ybqx511528_xingwen/pages/Works/TJXX/tj_data.dart';
|
||||
|
||||
import '../../components/EncryptUtil.dart';
|
||||
import '../../components/commonFun.dart';
|
||||
import '../../config/Config.dart';
|
||||
import '../../config/service_url.dart';
|
||||
import '../../services/EventBus.dart';
|
||||
import '../../services/Storage.dart';
|
||||
import '../../widget/JdButton.dart';
|
||||
import '../../widget/JdText.dart';
|
||||
|
||||
class LoginByName2 extends StatefulWidget {
|
||||
@@ -128,6 +125,9 @@ class _LoginPageState extends State<LoginByName2> {
|
||||
Dio dio = Dio();
|
||||
|
||||
String random = RandomBit(6); //flutter (dart)生成N位随机数
|
||||
print('random = ${random}');
|
||||
print('sign = ${GenerateMd5(APPkey + random)}');
|
||||
|
||||
response = await dio.post(api, data: {
|
||||
"username": g_userInfo.username,
|
||||
"password": g_userInfo.password,
|
||||
|
||||
Reference in New Issue
Block a user