Browse Source

消息页面,演示环境配置

feature
mk 1 year ago
parent
commit
bf4fca8c7e
  1. 1
      .env.production
  2. 4
      .env.staging
  3. 11
      src/api/message.js
  4. 2
      src/config/env.staging.js
  5. 19
      src/views/home/index.vue
  6. 2
      vue.config.js

1
.env.production

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

4
.env.staging

@ -2,5 +2,5 @@ NODE_ENV='staging'
# must start with VUE_APP_
VUE_APP_ENV = 'staging'
VUE_APP_BASE_URL = '/'
outputDir = 'dist'
outputDir = 'epmet-work-wx-dev-staging'
outputDir = 'epmet-wx-pa-staging'
PUBLIC_PATH = ''

11
src/api/message.js

@ -0,0 +1,11 @@
// axios
import request from '@/utils/request'
//扫描二维码获取房屋信息
export function querystaffmessage(data) {
return request({
url: `/message/usermessage/staff/querystaffmessage`,
method: 'POST',
data
})
}

2
src/config/env.staging.js

@ -6,7 +6,7 @@ module.exports = {
technicalSupport: '',
copyright: 'Copyright @ 2023 版权所有',
baseUrl: 'https://epmet-preview.elinkservice.cn', // 项目地址
baseApi: 'https://epmet-preview.elinkservice.cn/api',
baseApi: 'https://epmet-preview.elinkservice.cn/testapi',
wxId: 'wx1078fa1e99424de9',
secret: 'ebecf6b88ab455f1cdf4a5b6357407b8',
mapKey: '5D6BZ-KHLW4-JUXU5-XIM47-5Q2DJ-IPBBT'

19
src/views/home/index.vue

@ -27,8 +27,7 @@
<div class="card flex flex-end flex-center2 m-top15 notice">
<img src="@/assets/images/icons/notice.png" class="img_17" alt="">
<div class="van-ellipsis flex-1">
<van-notice-bar color="#555555" background="#ffffff" text="在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。" />
<van-notice-bar color="#555555" background="#ffffff" text="" />
</div>
<span class="gray notice_time">05-06</span>
<span class="gray">更多</span>
@ -138,6 +137,8 @@
<script>
import registerDialog from '@/components/registerDialog';
import { communityActivity, icEventOldDiscuss, advertisingTag, communityPublicity,handelClicsupport } from '@/api/home';
import { querystaffmessage } from '@/api/message';
export default {
data() {
return {
@ -182,12 +183,26 @@ export default {
console.log(this.$store.state.app);
this.agencyId = this.$store.state.app.agencyId;
this.userId = this.$store.state.app.userInfo.id;
this.customerId = this.$store.state.app.userInfo.customerId;
this.communityActivity()//
this.icEventOldDiscuss()//
this.advertisingTag()//
this.communityPublicity()//
this.querystaffmessage()
},
methods: {
async querystaffmessage(){
let parm = {
agencyId: this.agencyId,
app:'h5',
userId: this.userId,
pageSize:10,
customerId:this.customerId,
pageNo:1
}
let res = await querystaffmessage(parm)
console.log(res);
},
async handelClicopposeNum(data){
let parm = {
eventId:data,

2
vue.config.js

@ -11,7 +11,7 @@ const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
publicPath: process.env.NODE_ENV === 'development' ? '/' : '/epmet-wx-pa', // 署应用包时的基本 URL。 vue-router hash 模式使用
publicPath: process.env.NODE_ENV === 'development' ? '/' : '', // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: process.env.NODE_ENV === 'development' ? '/' : '/h5', //署应用包时的基本 URL。 vue-router history模式使用
outputDir: `dist/${OUTPUT_FILE_NAME}`, // 生产环境构建文件的目录
assetsDir: 'static', // outputDir的静态资源(js、css、img、fonts)目录

Loading…
Cancel
Save