diff --git a/src/enums/cacheEnums.js b/src/enums/cacheEnums.js
index a67dd81..264ff92 100644
--- a/src/enums/cacheEnums.js
+++ b/src/enums/cacheEnums.js
@@ -4,5 +4,5 @@ export const AGREEWELCOME_KEY="agreewelcome";
// clientId 默认写2
export const CLIENT_ID="2";
// #区分内外网 //1-内网,2-外网
-export const NETWORK_ENV=2;
+export const NETWORK_ENV=1;
diff --git a/src/pages/deviceAuth/deviceAuth.vue b/src/pages/deviceAuth/deviceAuth.vue
index 6e5178b..2a14911 100644
--- a/src/pages/deviceAuth/deviceAuth.vue
+++ b/src/pages/deviceAuth/deviceAuth.vue
@@ -6,13 +6,26 @@
- 设备授权
+ {{networkEnv==1?'内网':''}}设备授权
-
+
+
+
+
+
+
+
+
+
+
+
+
{
- console.log("deviceAuth=>onLoad",clientId,networkEnv);
+ console.log("deviceAuth=>onLoad",clientId,networkEnv.value);
uni.setStorageSync('page_cache',true);
// uni.preloadPage({url: "/pages/login/login"});
// uni.preloadPage({url: "/pages/home/home"});
@@ -187,11 +200,17 @@ let refreshBindStatus = async ()=>{
// 账号登录
const form2 = ref(null);
const formData2 = ref({
+ uniqCode:'',
username: '',
password: ''
});
const rules2 = {
+ uniqCode:{
+ rules: [
+ { required: true, errorMessage: '请输入设备标识' },
+ ]
+ },
username: {
rules: [
{ required: true, errorMessage: '请输入用户名' },
@@ -212,8 +231,8 @@ const submitForm = async() => {
form2.value.validate().then(async param => {
btnLoading.value = true;
//1-内网,2-外网
- if(networkEnv==1){
- deviceId.value = form2.value.uniqCode;
+ if(networkEnv.value==1){
+ deviceId.value = param.uniqCode;
}else{
deviceId.value = uuidv4(); //2-外网 生成的设备唯一标识
}
@@ -450,6 +469,31 @@ const handleSubmit=()=>{
content: "\e66c" !important;
}
+/* 加设备ID样式 */
+.container .login-form.network1{
+ padding-bottom:50rpx;
+}
+.container .login-form.network1 .code-con{
+ padding:0 0 3rpx;
+}
+.container .login-form.network1 :deep(.uni-forms-item){
+ margin-bottom:10px !important
+}
+.container .login-form.network1 :deep(.uni-easyinput__content-input){
+ height: 30px !important;
+}
+
+.container .login-form .code-con.code-device :deep(.uni-easyinput__content .uniui-person){
+ background: url('@/static/images/login-biaoshi.png') 15rpx no-repeat;
+ background-size:25rpx 30rpx;
+ width: 25rpx;
+ height: 30rpx;
+ margin-right:10rpx;
+}
+.container .login-form .code-con.code-device :deep(.uniui-person:before){
+ display: none;
+}
+
.btn-submit{
width:496rpx;
height:88rpx;
diff --git a/src/pages/home/home.vue b/src/pages/home/home.vue
index d779879..7b89d59 100644
--- a/src/pages/home/home.vue
+++ b/src/pages/home/home.vue
@@ -14,9 +14,9 @@
>
-
+
diff --git a/src/static/images/login-biaoshi.png b/src/static/images/login-biaoshi.png
new file mode 100644
index 0000000..8c8e479
Binary files /dev/null and b/src/static/images/login-biaoshi.png differ