Commit a2b4b281 authored by 李智书's avatar 李智书

1.新增小程序通知详情页面

parent 3c14375a
...@@ -66,6 +66,20 @@ ...@@ -66,6 +66,20 @@
} }
} }
}, {
"path": "pages/NoticeInfo/NoticeInfo",
"style": {
"navigationBarTitleText": "通知公告",
"enablePullDownRefresh": false,
"usingComponents": {
},
"h5": {
"titleNView": "transparent"
}
}
} }
], ],
"globalStyle": { "globalStyle": {
......
<template>
<view class="container">
<view class="NoticeInfo" v-html="NoticeInfo">
</view>
</view>
</template>
<script>
let gHost = "https://" + window.location.host;
if (window.location.protocol != "https:") {
gHost = "https://fpdev.xiaopay.net";
}
//获取参数
function getQueryParams(params) {
let href = window.location.href
let query = href.substring(href.indexOf('?') + 1);
let vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
let pair = vars[i].split("=");
if (pair[0] == params) {
return pair[1];
}
}
return (false);
}
export default {
name: "NoticeInfo",
data() {
return {
NoticeInfo: ""
}
},
onLoad: function(options) {
console.log(options);
if (!options.sessionid) {
uni.showModal({
title: "系统提示",
showCancel: false,
content: "参数错误",
})
return
}
this.selectNoticeByOrgId(options.sessionid, options.schoolid, options.operatorId)
},
methods: {
// 小程序端查询通知公告
async selectNoticeByOrgId(sessionid, schoolid, operatorId) {
let this_ = this;
try {
await new Promise((resolve, reject) => {
// 二维码加密内容获取token
$.ajax({
url: 'http://192.168.0.54:8092/notice/noticeConfig/selectNoticeByOrgId', //开发者服务器接口地址",
type: "post",
dataType: 'json',
contentType: 'application/json; charset=UTF-8',
cache: false,
data: JSON.stringify({
schoolid,
operatorId,
sessionid
}),
success: function(res) {
if (res.code == 10000) {
resolve(res)
} else {
reject(res)
}
},
error: function(error) {
reject(error)
}
})
})
} catch (err) {
//TODO handle the exception
uni.showModal({
title: "系统提示",
content: err.message
})
}
}
}
}
</script>
<style scoped>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment