Browse Source

电子门牌,正式环境打包配置

feature
mk 1 year ago
parent
commit
fa866df79a
  1. 2
      .env.production
  2. 4
      src/router/index.js
  3. 6
      src/views/houseQR/index.vue

2
.env.production

@ -3,4 +3,4 @@ NODE_ENV='production'
VUE_APP_ENV = 'production' VUE_APP_ENV = 'production'
VUE_APP_BASE_URL = '/' VUE_APP_BASE_URL = '/'
outputDir = 'epmet-wx-pa' outputDir = 'epmet-wx-pa'
PUBLIC_PATH = 'epmet-wx-pa' PUBLIC_PATH = ''

4
src/router/index.js

@ -52,7 +52,7 @@ function paramsFormat(params) {
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
let urlParams = getQueryParams() let urlParams = getQueryParams()
if(urlParams.houseId){ if(urlParams.houseId){
console.log(urlParams); console.log(urlParams,'初始路由参数');
store.commit('SET_HOUSE_ID', urlParams.houseId) store.commit('SET_HOUSE_ID', urlParams.houseId)
}else{ }else{
store.commit('SET_HOUSE_ID', null) store.commit('SET_HOUSE_ID', null)
@ -67,7 +67,7 @@ router.beforeEach((to, from, next) => {
} else { } else {
store.commit('SET_APP_ID', localStorage.getItem('appId')) store.commit('SET_APP_ID', localStorage.getItem('appId'))
} }
if (!localStorage.getItem('appId') && to.path !== '/errorPage') { if (!localStorage.getItem('appId') && to.path !== '/errorPage'&& to.path != '/houseQR') {
if(to.path === '/errorPage'){ if(to.path === '/errorPage'){
next('/errorPage') next('/errorPage')
}else{ }else{

6
src/views/houseQR/index.vue

@ -3,12 +3,12 @@
<div class="header"> <div class="header">
<div class="mask"></div> <div class="mask"></div>
</div> </div>
<section class=""> <section v-if="formData">
<div class="flex flex-y m-bot10"> <div class="flex flex-y m-bot10">
<div class="house_base flex"> <div class="house_base flex">
<img src="@/assets/images/houseQR/house.png" alt="" /> <img src="@/assets/images/houseQR/house.png" alt="" />
<div class="flex flex-y flex-center1 flex1"> <div class="flex flex-y flex-center1 flex1">
<div class="van-multi-ellipsis--l3">{{ formData.houseAddress }}</div> <div class="van-multi-ellipsis--l3">{{ formData.houseAddress || '--' }}</div>
</div> </div>
</div> </div>
<div class="card flex flex-y basi_content content"> <div class="card flex flex-y basi_content content">
@ -135,7 +135,7 @@ export default {
}, },
created() { created() {
console.log(this.$store.state.app.houseId, '路由中') console.log(this.$store.state.app.houseId, '路由中')
this.houesId = '1712031260179378180' this.houesId = this.$store.state.app.houseId
this.getHouseInfo() this.getHouseInfo()
}, },
mounted() { }, mounted() { },

Loading…
Cancel
Save