diff --git a/App.vue b/App.vue index 3d74661..4ae28bd 100644 --- a/App.vue +++ b/App.vue @@ -1,14 +1,21 @@ diff --git a/pages/login/index.vue b/pages/login/index.vue index ec32e73..e2f5138 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -19,7 +19,7 @@ {{ `(${timer}S后) ` }} - 重新获取 + 重新获取 获取验证码 @@ -40,9 +40,10 @@ diff --git a/pages/production-info/index.vue b/pages/production-info/index.vue index d5e52a9..4f32399 100644 --- a/pages/production-info/index.vue +++ b/pages/production-info/index.vue @@ -1,6 +1,6 @@ @@ -72,6 +101,7 @@ import Banner from './Banner.vue' import { go2 } from '@/utils/hook.js' import { getFactoryInfo } from '@/apis/factoryApi.js' import { getEquipmentList } from '@/apis/deviceApi.js' +import { getProductionList } from '@/apis/productionApi.js' import { fileType } from '@/enums/index.js' export default { components: { @@ -190,14 +220,14 @@ export default { }) } if (this.curTab == 'production') { - getEquipmentList({ ...this.pagination }).then((res) => { + getProductionList({ ...this.pagination }).then((res) => { if (res) { if (res.current <= 1) { - this.deviceList = res.records + this.productionList = res.records } else { - this.deviceList = this.deviceList.concat(res.records) + this.productionList = this.productionList.concat(res.records) } - this.hasMore = this.deviceList.length < res.total + this.hasMore = this.productionList.length < res.total } }) } @@ -219,6 +249,29 @@ export default { if (this.curTab == 'production') { go2('production-operation', { operation: 'add' }) } + }, + popupShow() { + this.$refs.popup.open('bottom') + }, + popupHide() { + this.$refs.popup.close() + }, + shareFactory(scene) { + uni.share({ + provider: 'weixin', + type: 0, + title: factoryInfo.name, + summary: '印包客支持远程验厂,在线了解工厂', + scene: scene, // WXSceneTimeline,WXSceneSession + imageUrl: 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/wx-share-store.png', + href: H5_URL_FACTORY + `shareId=${res}`, + success: () => { + console.log('分享成功') + }, + fail: (err) => { + console.log('err', err) + } + }) } } } @@ -404,4 +457,87 @@ export default { } } } +.section_6 { + padding-top: 40rpx; + overflow: hidden; + border-radius: 40rpx 40rpx 0px 0px; + background-color: rgb(255, 255, 255); + height: 408rpx; + .text_13 { + align-self: center; + color: rgb(51, 51, 51); + font-size: 28rpx; + font-weight: 500; + line-height: 40rpx; + white-space: nowrap; + } + .group_20 { + margin-top: 40rpx; + .group_21 { + padding: 0 48rpx 32rpx; + color: rgb(51, 51, 51); + font-size: 24rpx; + line-height: 33rpx; + white-space: nowrap; + .group_23 { + width: 494rpx; + .image_15 { + width: 96rpx; + height: 96rpx; + } + .text_15 { + margin-left: 12rpx; + margin-top: 16rpx; + } + } + .image_14 { + border-radius: 50%; + width: 96rpx; + height: 96rpx; + } + .text_14 { + margin-top: 16rpx; + } + } + .section_7 { + background-color: rgb(247, 248, 250); + height: 16rpx; + } + .button { + padding: 26rpx 0; + color: rgb(51, 51, 51); + font-size: 32rpx; + line-height: 45rpx; + white-space: nowrap; + background-color: rgb(255, 255, 255); + } + } +} +.grid { + padding: 20rpx 32rpx 91rpx; + width: 750rpx; + color: rgb(31, 31, 31); + font-size: 28rpx; + font-weight: 500; + line-height: 40rpx; + white-space: nowrap; + display: grid; + grid-template-columns: repeat(2, 1fr); + grid-row-gap: 22rpx; + grid-column-gap: 16rpx; + .grid-item { + padding: 24rpx 20rpx 20rpx; + border-radius: 10rpx; + filter: drop-shadow(0px 5rpx 11rpx #00000014); + background-color: rgb(255, 255, 255); + background-position: 0px 0px; + background-size: 100% 100%; + background-repeat: no-repeat; + .image_7 { + margin-top: 20rpx; + width: 296rpx; + height: 296rpx; + } + } +} diff --git a/store/index.js b/store/index.js index d2a44b4..8bd4326 100644 --- a/store/index.js +++ b/store/index.js @@ -12,7 +12,7 @@ let qnToken = null, userInfo = null, /** * @value id 企业id - * @value enterpriseType 企业类型 + * @value enterpriseType 企业类型 印刷包装厂 2 ; 供应商 5 ; 个人 8 * @value name 企业名称 * @value fddEnterpriseStatus 法大大认证状态 。1未认证,2认证进行中,3认证成功,4认证失败 */ diff --git a/utils/hook.js b/utils/hook.js index af25558..7ca9b03 100644 --- a/utils/hook.js +++ b/utils/hook.js @@ -1,5 +1,5 @@ import store from '@/store/index' -import { uploadUrl, XAPPID } from '@/enums/index.js' +import { uploadUrl, XAPPID, enterpriseType } from '@/enums/index.js' import { pushCustomerOff } from '@/apis/commonApi' // 框架方法封装 const tabList = ['digital-workshops', 'promotion', 'mall', 'mine'] @@ -15,6 +15,29 @@ export function tab2(tabPage) { }) } } + +/** + * 根据用户角色动态改变tabbar + * @param {number} type 企业类型 + * @return {null} + */ +export function changeTabbar(type) { + if (type == enterpriseType.PERSONAL) { + ;[0, 1].forEach((index) => { + uni.setTabBarItem({ + index: index, + visible: false + }) + }) + } else { + ;[0, 1].forEach((index) => { + uni.setTabBarItem({ + index: index, + visible: true + }) + }) + } +} /** * @param {string} 返回上一级 * @return {null}