优化代码

This commit is contained in:
wuxw 2025-04-27 16:22:45 +08:00
parent 736ce4b436
commit fa3eee1a81
3 changed files with 16 additions and 22 deletions

View File

@ -10,7 +10,7 @@ export default {
loginOwnerUrl: baseUrl + 'app/loginOwner',
phoneWechatLogin: baseUrl + "app/login.phoneWechatLogin",
areaUrl: baseUrl + "app/area.listAreas",
GetNoticeListUrl: baseUrl + 'app/notice.listNotices', //公告接口
GetNoticeListUrl: baseUrl + 'app/notice.queryPhoneNotice', //公告接口
saveOwnerRepair: baseUrl + 'app/ownerRepair.saveOwnerRepair', //报修
listOwnerRepairs: baseUrl + 'app/ownerRepair.listOwnerRepairs', //查询报修
saveOwner: baseUrl + 'app/owner.saveOwnerMember', //家庭成员列表

View File

@ -80,12 +80,12 @@
"disableHostCheck" : true,
"proxy" : {
"/app" : {
"target" : "http://mall.jyzctech.com/", //
"target" : "http://127.0.0.1:8008/", //
"changeOrigin" : true, //
"secure" : true // https
},
"/callComponent" : {
"target" : "http://mall.jyzctech.com/", //
"target" : "http://127.0.0.1:8008/", //
"changeOrigin" : true, //
"secure" : true // https
}

View File

@ -25,6 +25,9 @@
import {replaceImgSrc} from '../../../lib/java110/utils/ImageUtil.js'
//app
const app = getApp().globalData;
import {
queryNotices
} from '@/api/index/indexApi.js';
import jyfParser from "@/components/jyf-parser/jyf-parser";
@ -54,25 +57,16 @@
methods: {
_loadNoticeDetail: function() {
let that = this;
context.request({
header: context.getHeaders(),
url: constant.url.GetNoticeListUrl,
method: "GET",
data: {
communityId: that.communityId,
page: 1,
row: 10,
noticeId: that.noticeId
},
success: function(res) {
// TODO
console.log(res);
let notice = res.data.notices[0]
notice.timeStr = notice.startTime.replace(/:\d{1,2}$/, ' ');
notice.context = replaceImgSrc(notice.context,conf.baseUrl);
that.notice = notice;
}
queryNotices({
communityId: that.communityId,
page: 1,
row: 10,
noticeId: that.noticeId
}).then((_notices) => {
let notice = _notices[0]
notice.timeStr = notice.startTime.replace(/:\d{1,2}$/, ' ');
notice.context = replaceImgSrc(notice.context,conf.baseUrl);
that.notice = notice;
});
}
}