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_BASE_URL = '/'
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) => {
let urlParams = getQueryParams()
if(urlParams.houseId){
console.log(urlParams);
console.log(urlParams,'初始路由参数');
store.commit('SET_HOUSE_ID', urlParams.houseId)
}else{
store.commit('SET_HOUSE_ID', null)
@ -67,7 +67,7 @@ router.beforeEach((to, from, next) => {
} else {
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'){
next('/errorPage')
}else{

6
src/views/houseQR/index.vue

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

Loading…
Cancel
Save