mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
优化代码
This commit is contained in:
parent
736ce4b436
commit
fa3eee1a81
@ -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', //家庭成员列表
|
||||
|
||||
@ -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协议的代理
|
||||
}
|
||||
|
||||
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user