优化代码

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', loginOwnerUrl: baseUrl + 'app/loginOwner',
phoneWechatLogin: baseUrl + "app/login.phoneWechatLogin", phoneWechatLogin: baseUrl + "app/login.phoneWechatLogin",
areaUrl: baseUrl + "app/area.listAreas", areaUrl: baseUrl + "app/area.listAreas",
GetNoticeListUrl: baseUrl + 'app/notice.listNotices', //公告接口 GetNoticeListUrl: baseUrl + 'app/notice.queryPhoneNotice', //公告接口
saveOwnerRepair: baseUrl + 'app/ownerRepair.saveOwnerRepair', //报修 saveOwnerRepair: baseUrl + 'app/ownerRepair.saveOwnerRepair', //报修
listOwnerRepairs: baseUrl + 'app/ownerRepair.listOwnerRepairs', //查询报修 listOwnerRepairs: baseUrl + 'app/ownerRepair.listOwnerRepairs', //查询报修
saveOwner: baseUrl + 'app/owner.saveOwnerMember', //家庭成员列表 saveOwner: baseUrl + 'app/owner.saveOwnerMember', //家庭成员列表

View File

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

View File

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