diff --git a/apis/deviceApi.js b/apis/deviceApi.js index 9206ea9..e8d074c 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 7d1eda4..b882ef2 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 12f4030..4b31164 100644 --- a/pages/digital-workshops/index.vue +++ b/pages/digital-workshops/index.vue @@ -44,7 +44,7 @@ - + 设备列表 新增 @@ -117,7 +117,8 @@ export default { { id: 3, name: '覆膜机', working: 1, free: 1 } ], cameraList: [], - refresh: this.$store.state.userInfo.userId + refresh: this.$store.state.userInfo.userId, + hasCompany: this.$store.state.companyInfo.id } }, onLoad() { @@ -131,6 +132,9 @@ export default { watch: { factoryId(val) { if (val === -1) { + if (this.companyTip()) { + return + } go2('factory-manage') } else { this.getCameraList() @@ -187,7 +191,25 @@ export default { this.listObj = data }) }, + companyTip() { + if (!this.hasCompany) { + uni.showModal({ + title: '提示', + content: '您还没有企业,请前往完善企业信息', + success: (res) => { + if (res.confirm) { + go2('enterprise-info') + } + } + }) + return true + } + return false + }, addDevice() { + if (this.companyTip()) { + return + } // 先判断是否时演示工厂 go2('add-device', { id: this.factoryId, operation: 'edit' }) }, @@ -229,7 +251,6 @@ export default { } .group { flex: 1 1 auto; - overflow-y: auto; .section_1 { padding-top: 82rpx; background-image: url('/static/imgs/digital-workshops/top-bg.png'); @@ -391,8 +412,15 @@ export default { } .section_9 { margin-top: 20rpx; - padding: 19rpx 32rpx 20rpx; + padding: 0 32rpx; background-color: rgb(255, 255, 255); + .sticky { + position: sticky; + top: 0; + z-index: 10; + background: white; + padding: 30rpx 0 20rpx; + } .text_19 { color: rgb(51, 51, 51); font-size: 36rpx; @@ -415,7 +443,6 @@ export default { } .list-area { padding-bottom: 40rpx; - margin-top: 20rpx; } .group_9 { margin-top: 39rpx; diff --git a/pages/mall/index.vue b/pages/mall/index.vue index 00f46a5..8e4ec1d 100644 --- a/pages/mall/index.vue +++ b/pages/mall/index.vue @@ -24,7 +24,12 @@ - +