mo-bai 3 years ago
parent
commit
a35dfa3a18
4 changed files with 42 additions and 10 deletions
  1. 4
      apis/deviceApi.js
  2. 4
      apis/factoryApi.js
  3. 37
      pages/digital-workshops/index.vue
  4. 7
      pages/mall/index.vue

4
apis/deviceApi.js

@ -108,8 +108,8 @@ export function removeDevice(data = {}) {
*/ */
export function getDeviceListV2(data = {}) { export function getDeviceListV2(data = {}) {
return http.get({ 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 data
}) })
} }

4
apis/factoryApi.js

@ -78,8 +78,8 @@ export function getCameraListApi(data = {}) {
*/ */
export function getMyFactoryList(data = {}) { export function getMyFactoryList(data = {}) {
return http.get({ 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 data
}) })
} }

37
pages/digital-workshops/index.vue

@ -44,7 +44,7 @@
</view> </view>
</view> </view>
<view class="flex-col section_9"> <view class="flex-col section_9">
<view class="justify-between">
<view class="justify-between sticky">
<text class="text_19">设备列表</text> <text class="text_19">设备列表</text>
<view class="flex-row group_14" v-if="!isExample" @click="addDevice"> <view class="flex-row group_14" v-if="!isExample" @click="addDevice">
<text>新增</text> <text>新增</text>
@ -117,7 +117,8 @@ export default {
{ id: 3, name: '覆膜机', working: 1, free: 1 } { id: 3, name: '覆膜机', working: 1, free: 1 }
], ],
cameraList: [], cameraList: [],
refresh: this.$store.state.userInfo.userId
refresh: this.$store.state.userInfo.userId,
hasCompany: this.$store.state.companyInfo.id
} }
}, },
onLoad() { onLoad() {
@ -131,6 +132,9 @@ export default {
watch: { watch: {
factoryId(val) { factoryId(val) {
if (val === -1) { if (val === -1) {
if (this.companyTip()) {
return
}
go2('factory-manage') go2('factory-manage')
} else { } else {
this.getCameraList() this.getCameraList()
@ -187,7 +191,25 @@ export default {
this.listObj = data this.listObj = data
}) })
}, },
companyTip() {
if (!this.hasCompany) {
uni.showModal({
title: '提示',
content: '您还没有企业,请前往完善企业信息',
success: (res) => {
if (res.confirm) {
go2('enterprise-info')
}
}
})
return true
}
return false
},
addDevice() { addDevice() {
if (this.companyTip()) {
return
}
// //
go2('add-device', { id: this.factoryId, operation: 'edit' }) go2('add-device', { id: this.factoryId, operation: 'edit' })
}, },
@ -229,7 +251,6 @@ export default {
} }
.group { .group {
flex: 1 1 auto; flex: 1 1 auto;
overflow-y: auto;
.section_1 { .section_1 {
padding-top: 82rpx; padding-top: 82rpx;
background-image: url('/static/imgs/digital-workshops/top-bg.png'); background-image: url('/static/imgs/digital-workshops/top-bg.png');
@ -391,8 +412,15 @@ export default {
} }
.section_9 { .section_9 {
margin-top: 20rpx; margin-top: 20rpx;
padding: 19rpx 32rpx 20rpx;
padding: 0 32rpx;
background-color: rgb(255, 255, 255); background-color: rgb(255, 255, 255);
.sticky {
position: sticky;
top: 0;
z-index: 10;
background: white;
padding: 30rpx 0 20rpx;
}
.text_19 { .text_19 {
color: rgb(51, 51, 51); color: rgb(51, 51, 51);
font-size: 36rpx; font-size: 36rpx;
@ -415,7 +443,6 @@ export default {
} }
.list-area { .list-area {
padding-bottom: 40rpx; padding-bottom: 40rpx;
margin-top: 20rpx;
} }
.group_9 { .group_9 {
margin-top: 39rpx; margin-top: 39rpx;

7
pages/mall/index.vue

@ -24,7 +24,12 @@
</view> </view>
</view> </view>
<view class="bottom-group_1 flex-row"> <view class="bottom-group_1 flex-row">
<view class="paper-group flex-col" v-for="paper in item.skuList" :key="paper.productId" @click="go2('paper-details', { paperId: paper.productId })">
<view
class="paper-group flex-col"
v-for="paper in item.skuList"
:key="paper.productSkuId"
@click="go2('paper-details', { paperId: paper.productId })"
>
<view class="top-group flex-col items-center"> <view class="top-group flex-col items-center">
<image :src="paper.litPicUrl || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'" class="image_4" /> <image :src="paper.litPicUrl || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'" class="image_4" />
<view class="flex-col text-wrapper"> <view class="flex-col text-wrapper">

Loading…
Cancel
Save