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" />
<view class="center-group flex-col">
<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">
<text class="text_18">{{ item.score }}</text>
</view>
@ -43,6 +43,16 @@ export default {
return []
}
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 唯一环境变量
*/
const env = 'test'
// const env = 'test'
// const env = 'dev'
// const env = 'production'
const env = 'production'
export default env

9
manifest.json

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

6
pages/device-info/index.vue

@ -24,7 +24,7 @@
<view class="flex-col items-center text-wrapper_1" @click="deleteDevice">
<text>删除</text>
</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>
</view>
</view>
@ -41,12 +41,14 @@ export default {
info: { imgItemList: [] },
id: null,
swiperCurrent: 0,
operation: 'edit'
operation: 'edit',
factoryId: null
}
},
onLoad(options) {
if (options.id) {
this.id = options.id
this.factoryId = options.factoryId
}
if (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="生产设备详情">
<view slot="right"><text class="text_4" @click="popupShow">分享</text></view>
</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 class="flex-col group_6">
<view class="flex-col">

2
pages/factory/index.vue

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

5
pages/mine/index.vue

@ -111,7 +111,7 @@
</template>
<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 { getVerifyUrl, getFsCredit, getBaseInfo, getFeisuanUrl, cancelAccount } from '@/apis/commonApi.js'
import { getDeviceStatistics } from '@/apis/mineApi'
@ -136,6 +136,9 @@ export default {
}
},
methods: {
logout() {
exit()
},
loginGo2,
cancelAccount() {
uni.showModal({

6
pages/production-info/index.vue

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

4
pages/promotion/index.vue

@ -53,7 +53,7 @@
class="flex-col section_3"
v-for="(item, index) in deviceList"
: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" />
<view class="flex-col">
@ -72,7 +72,7 @@
class="flex-col grid-item"
v-for="production in productionList"
: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>
<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