mo-bai 3 years ago
parent
commit
bdcdac3943
10 changed files with 37 additions and 16 deletions
  1. 12
      components/business-components/factoryItem.vue
  2. 4
      env/index.js
  3. 9
      manifest.json
  4. 6
      pages/device-info/index.vue
  5. 5
      pages/device-production-info/index.vue
  6. 2
      pages/factory/index.vue
  7. 5
      pages/mine/index.vue
  8. 6
      pages/production-info/index.vue
  9. 4
      pages/promotion/index.vue
  10. BIN
      static/imgs/factory/default-factory.png

12
components/business-components/factoryItem.vue

@ -3,7 +3,7 @@
<image :src="item.pictureUrl || '/static/imgs/factory/default-factory.png'" class="image_8" /> <image :src="item.pictureUrl || '/static/imgs/factory/default-factory.png'" class="image_8" />
<view class="center-group flex-col"> <view class="center-group flex-col">
<view class="flex-row"> <view class="flex-row">
<text class="text_11 text-ellipsis" @click="go2('factory-info', { id: item.factoryId })">{{ item.name }}</text>
<text class="text_11 text-ellipsis" @click="jump(item)">{{ item.name }}</text>
<view class="right-text-wrapper_1 flex-col"> <view class="right-text-wrapper_1 flex-col">
<text class="text_18">{{ item.score }}</text> <text class="text_18">{{ item.score }}</text>
</view> </view>
@ -43,6 +43,16 @@ export default {
return [] return []
} }
return arr.slice(0, length) return arr.slice(0, length)
},
jump(item) {
if (!item.factoryId) {
uni.showToast({
title: '暂无工厂详情',
icon: 'none'
})
return
}
go2('factory-info', { id: item.factoryId })
} }
} }
} }

4
env/index.js

@ -1,8 +1,8 @@
/** /**
* @description 唯一环境变量 * @description 唯一环境变量
*/ */
const env = 'test'
// const env = 'test'
// const env = 'dev' // const env = 'dev'
// const env = 'production'
const env = 'production'
export default env export default env

9
manifest.json

@ -2,7 +2,7 @@
"name" : "印包客", "name" : "印包客",
"appid" : "__UNI__EBBA73E", "appid" : "__UNI__EBBA73E",
"description" : "", "description" : "",
"versionName" : "1.0.1",
"versionName" : "1.0.2",
"versionCode" : 100, "versionCode" : 100,
"transformPx" : false, "transformPx" : false,
"networkTimeout" : { "networkTimeout" : {
@ -27,7 +27,8 @@
"Share" : {}, "Share" : {},
"Payment" : {}, "Payment" : {},
"Push" : {}, "Push" : {},
"VideoPlayer" : {}
"VideoPlayer" : {},
"Geolocation" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
@ -84,8 +85,8 @@
"geolocation" : { "geolocation" : {
"amap" : { "amap" : {
"__platform__" : [ "ios", "android" ], "__platform__" : [ "ios", "android" ],
"appkey_ios" : "0182ee2a9fdd5fd3ef6a8bd5a2f98325",
"appkey_android" : "877848546f7f3717101a17c33e1d4df3"
"appkey_ios" : "d574088098995ca1210d6b2df09c5dc9",
"appkey_android" : "c8116effd223c3f69a120f86695afc40"
} }
}, },
"share" : { "share" : {

6
pages/device-info/index.vue

@ -24,7 +24,7 @@
<view class="flex-col items-center text-wrapper_1" @click="deleteDevice"> <view class="flex-col items-center text-wrapper_1" @click="deleteDevice">
<text>删除</text> <text>删除</text>
</view> </view>
<view class="flex-col items-center text-wrapper_2" @click="go2('device-operation', { operation: 'edit', id: info.id })">
<view class="flex-col items-center text-wrapper_2" @click="go2('device-operation', { operation: 'edit', id: info.id, factoryId: factoryId })">
<text>编辑</text> <text>编辑</text>
</view> </view>
</view> </view>
@ -41,12 +41,14 @@ export default {
info: { imgItemList: [] }, info: { imgItemList: [] },
id: null, id: null,
swiperCurrent: 0, swiperCurrent: 0,
operation: 'edit'
operation: 'edit',
factoryId: null
} }
}, },
onLoad(options) { onLoad(options) {
if (options.id) { if (options.id) {
this.id = options.id this.id = options.id
this.factoryId = options.factoryId
} }
if (options.operation) { if (options.operation) {
this.operation = options.operation this.operation = options.operation

5
pages/device-production-info/index.vue

@ -3,8 +3,9 @@
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="生产设备详情"> <uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="生产设备详情">
<view slot="right"><text class="text_4" @click="popupShow">分享</text></view> <view slot="right"><text class="text_4" @click="popupShow">分享</text></view>
</uni-nav-bar> </uni-nav-bar>
<view class="flex-col items-center group_1" v-if="info.videoUrl">
<image src="/static/imgs/digital-workshops/camera-tip-bg.png" class="image_2" @click="go2('video-play', { url: info.videoUrl })" />
<view class="flex-col items-center group_1" v-if="info.videoUrl || (info.imgItemList && info.imgItemList[0])">
<image v-if="info.videoUrl" src="/static/imgs/digital-workshops/camera-tip-bg.png" class="image_2" @click="go2('video-play', { url: info.videoUrl })" />
<image v-else :src="info.imgItemList[0].url" class="image_2" />
</view> </view>
<view class="flex-col group_6"> <view class="flex-col group_6">
<view class="flex-col"> <view class="flex-col">

2
pages/factory/index.vue

@ -164,11 +164,13 @@ export default {
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'gcj02',
success: (res) => { success: (res) => {
console.log('success:', res)
this.condition.latitude = res.latitude this.condition.latitude = res.latitude
this.condition.longitude = res.longitude this.condition.longitude = res.longitude
resolve() resolve()
}, },
fail: (err) => { fail: (err) => {
console.log('error:', err)
this.condition.latitude = null this.condition.latitude = null
this.condition.longitude = null this.condition.longitude = null
reject() reject()

5
pages/mine/index.vue

@ -111,7 +111,7 @@
</template> </template>
<script> <script>
import { go2, loginGo2 } from '@/utils/hook.js'
import { go2, loginGo2, exit } from '@/utils/hook.js'
import { fddEnterpriseStatus, fsAuditStatus, orderStatusEnum, enterpriseType } from '@/enums/index.js' import { fddEnterpriseStatus, fsAuditStatus, orderStatusEnum, enterpriseType } from '@/enums/index.js'
import { getVerifyUrl, getFsCredit, getBaseInfo, getFeisuanUrl, cancelAccount } from '@/apis/commonApi.js' import { getVerifyUrl, getFsCredit, getBaseInfo, getFeisuanUrl, cancelAccount } from '@/apis/commonApi.js'
import { getDeviceStatistics } from '@/apis/mineApi' import { getDeviceStatistics } from '@/apis/mineApi'
@ -136,6 +136,9 @@ export default {
} }
}, },
methods: { methods: {
logout() {
exit()
},
loginGo2, loginGo2,
cancelAccount() { cancelAccount() {
uni.showModal({ uni.showModal({

6
pages/production-info/index.vue

@ -24,7 +24,7 @@
<view class="flex-col items-center text-wrapper_1" @click="deleteProduction"> <view class="flex-col items-center text-wrapper_1" @click="deleteProduction">
<text>删除</text> <text>删除</text>
</view> </view>
<view class="flex-col items-center text-wrapper_2" @click="go2('production-operation', { operation: 'edit', id: info.id })">
<view class="flex-col items-center text-wrapper_2" @click="go2('production-operation', { operation: 'edit', id: info.id, factoryId: factoryId })">
<text>编辑</text> <text>编辑</text>
</view> </view>
</view> </view>
@ -41,12 +41,14 @@ export default {
info: { imgItemList: [] }, info: { imgItemList: [] },
id: null, id: null,
swiperCurrent: 0, swiperCurrent: 0,
operation: 'edit'
operation: 'edit',
factoryId: null
} }
}, },
onLoad(options) { onLoad(options) {
if (options.id) { if (options.id) {
this.id = options.id this.id = options.id
this.factoryId = options.factoryId
} }
if (options.operation) { if (options.operation) {
this.operation = options.operation this.operation = options.operation

4
pages/promotion/index.vue

@ -53,7 +53,7 @@
class="flex-col section_3" class="flex-col section_3"
v-for="(item, index) in deviceList" v-for="(item, index) in deviceList"
:key="index" :key="index"
@click="go2('device-info', { id: item.id, operation: operation })"
@click="go2('device-info', { id: item.id, operation: operation, factoryId: factoryId })"
> >
<image mode="aspectFit" @click.stop="preview(item)" :src="item.imgItemList[0].url" class="image_5" /> <image mode="aspectFit" @click.stop="preview(item)" :src="item.imgItemList[0].url" class="image_5" />
<view class="flex-col"> <view class="flex-col">
@ -72,7 +72,7 @@
class="flex-col grid-item" class="flex-col grid-item"
v-for="production in productionList" v-for="production in productionList"
:key="production.id" :key="production.id"
@click="go2('production-info', { id: production.id, operation: operation })"
@click="go2('production-info', { id: production.id, operation: operation, factoryId: factoryId })"
> >
<text>{{ production.name }}</text> <text>{{ production.name }}</text>
<image mode="aspectFit" :src="production.imgItemList[0].url" class="image_7" /> <image mode="aspectFit" :src="production.imgItemList[0].url" class="image_7" />

BIN
static/imgs/factory/default-factory.png

Before After
Width: 360  |  Height: 360  |  Size: 252 KiB Width: 180  |  Height: 180  |  Size: 19 KiB
Loading…
Cancel
Save