diff --git a/constant/url.js b/constant/url.js index 4f7ae7f..a531a7c 100644 --- a/constant/url.js +++ b/constant/url.js @@ -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', //家庭成员列表 diff --git a/manifest.json b/manifest.json index 339ff7b..09a5ab9 100644 --- a/manifest.json +++ b/manifest.json @@ -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协议的代理 } diff --git a/pages/notice/detail/detail.vue b/pages/notice/detail/detail.vue index 1cb7b19..01e13dc 100644 --- a/pages/notice/detail/detail.vue +++ b/pages/notice/detail/detail.vue @@ -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; }); } }