From 8fd11ecaf460fc7a080e9a731806887b5e52bddf Mon Sep 17 00:00:00 2001
From: mo-bai <1873032855@qq.com>
Date: Fri, 29 Apr 2022 10:32:48 +0800
Subject: [PATCH] bug
---
apis/deviceApi.js | 4 ++--
apis/factoryApi.js | 4 ++--
pages/digital-workshops/index.vue | 8 ++++++-
pages/enterprise-info-edit/index.vue | 5 +++--
pages/enterprise-info/index.vue | 31 ++++++++++++++--------------
5 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/apis/deviceApi.js b/apis/deviceApi.js
index e8d074c..9206ea9 100644
--- a/apis/deviceApi.js
+++ b/apis/deviceApi.js
@@ -108,8 +108,8 @@ export function removeDevice(data = {}) {
*/
export function getDeviceListV2(data = {}) {
return http.get({
- url: `/base-paper-trading/get/mechanical-equipment/new/list`,
- // url: `https://console-mock.apipost.cn/app/mock/project/00682407-8a2f-402b-ae05-bea0dace4b58/getList`,
+ // url: `/base-paper-trading/get/mechanical-equipment/new/list`,
+ url: `https://console-mock.apipost.cn/app/mock/project/00682407-8a2f-402b-ae05-bea0dace4b58/getList`,
data
})
}
diff --git a/apis/factoryApi.js b/apis/factoryApi.js
index b882ef2..7d1eda4 100644
--- a/apis/factoryApi.js
+++ b/apis/factoryApi.js
@@ -78,8 +78,8 @@ export function getCameraListApi(data = {}) {
*/
export function getMyFactoryList(data = {}) {
return http.get({
- url: `/yyt-uec/get/my/factory/list`,
- // url: `https://console-mock.apipost.cn/app/mock/project/00682407-8a2f-402b-ae05-bea0dace4b58/getFactoryList`,
+ // url: `/yyt-uec/get/my/factory/list`,
+ url: `https://console-mock.apipost.cn/app/mock/project/00682407-8a2f-402b-ae05-bea0dace4b58/getFactoryList`,
data
})
}
diff --git a/pages/digital-workshops/index.vue b/pages/digital-workshops/index.vue
index 4cc01ef..12f4030 100644
--- a/pages/digital-workshops/index.vue
+++ b/pages/digital-workshops/index.vue
@@ -116,7 +116,8 @@ export default {
{ id: 2, name: '模切机', working: 1, free: 1 },
{ id: 3, name: '覆膜机', working: 1, free: 1 }
],
- cameraList: []
+ cameraList: [],
+ refresh: this.$store.state.userInfo.userId
}
},
onLoad() {
@@ -136,6 +137,11 @@ export default {
this.getList()
this.isExample = this.factoryList.find((factory) => factory.value == val).isExample
}
+ },
+ refresh(val) {
+ if (val) {
+ this.getFactoryList()
+ }
}
},
methods: {
diff --git a/pages/enterprise-info-edit/index.vue b/pages/enterprise-info-edit/index.vue
index 401c61c..54c30f1 100644
--- a/pages/enterprise-info-edit/index.vue
+++ b/pages/enterprise-info-edit/index.vue
@@ -124,7 +124,7 @@
>
-
+
@@ -178,6 +178,7 @@ const validateFields = [
export default {
data() {
return {
+ endTimeStamp: new Date().getTime(),
operation: 'add',
form: {
id: null,
@@ -338,7 +339,7 @@ export default {
},
saveInfo() {
for (let validateField of validateFields) {
- if (this.form[validateField.field] === null || this.form[validateField.field] === '') {
+ if (this.form[validateField.field] == null || this.form[validateField.field] === '') {
uni.showToast({
title: `${validateField.label}不能为空`,
icon: 'none'
diff --git a/pages/enterprise-info/index.vue b/pages/enterprise-info/index.vue
index 73dfe59..6c028ca 100644
--- a/pages/enterprise-info/index.vue
+++ b/pages/enterprise-info/index.vue
@@ -141,7 +141,7 @@
>
-
+
@@ -207,6 +207,7 @@ const validateFields = [
export default {
data() {
return {
+ endTimeStamp: new Date().getTime(),
operation: 'add',
form: {
id: null,
@@ -252,12 +253,12 @@ export default {
methods: {
back,
jump() {
- go2('store')
+ go2('mine')
},
cancel() {
// 登录时取消则回到首页
if (this.operation === 'add') {
- go2('store', {}, true)
+ go2('mine', {}, true)
} else {
back()
}
@@ -410,24 +411,22 @@ export default {
})
},
saveInfo() {
- if (!this.form.id) {
- for (let validateField of validateFields) {
- if (this.form[validateField.field] === null || this.form[validateField.field] === '') {
- uni.showToast({
- title: `${validateField.label}不能为空`,
- icon: 'none'
- })
- return
- }
- }
- if (!/^1[3456789]\d{9}$/.test(this.form['legalPersonMobile'])) {
+ for (let validateField of validateFields) {
+ if (this.form[validateField.field] == null || this.form[validateField.field] === '') {
uni.showToast({
- title: '请输入正确法人手机号',
+ title: `${validateField.label}不能为空`,
icon: 'none'
})
return
}
}
+ if (!/^1[3456789]\d{9}$/.test(this.form['legalPersonMobile'])) {
+ uni.showToast({
+ title: '请输入正确法人手机号',
+ icon: 'none'
+ })
+ return
+ }
if (this.form.contactMobile && !/^1[3456789]\d{9}$/.test(this.form['contactMobile'])) {
uni.showToast({
title: '请输入正确联系人手机号',
@@ -442,7 +441,7 @@ export default {
icon: 'success'
})
setTimeout(() => {
- go2('store')
+ go2('mine')
}, 1000)
}
})