first commit
This commit is contained in:
39
unpackage/dist/dev/mp-weixin/pages/notice/details.js
vendored
Normal file
39
unpackage/dist/dev/mp-weixin/pages/notice/details.js
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_index = require("../../api/index.js");
|
||||
const utils_fun = require("../../utils/fun.js");
|
||||
if (!Array) {
|
||||
const _easycom_mp_html2 = common_vendor.resolveComponent("mp-html");
|
||||
_easycom_mp_html2();
|
||||
}
|
||||
const _easycom_mp_html = () => "../../uni_modules/mp-html/components/mp-html/mp-html.js";
|
||||
if (!Math) {
|
||||
_easycom_mp_html();
|
||||
}
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "details",
|
||||
setup(__props) {
|
||||
const articleItem = common_vendor.ref({});
|
||||
common_vendor.onLoad((options) => {
|
||||
api_index.api.noticeInfo({ id: options.id }).then((res) => {
|
||||
articleItem.value = res;
|
||||
});
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(articleItem.value.title),
|
||||
b: common_vendor.t(common_vendor.unref(utils_fun.timeFormat)(articleItem.value.createTime, "yyyy-MM-dd hh:mm:ss")),
|
||||
c: articleItem.value.video
|
||||
}, articleItem.value.video ? {
|
||||
d: articleItem.value.cover,
|
||||
e: articleItem.value.video
|
||||
} : {}, {
|
||||
f: common_vendor.p({
|
||||
content: articleItem.value.content
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
wx.createPage(_sfc_main);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/notice/details.js.map
|
||||
7
unpackage/dist/dev/mp-weixin/pages/notice/details.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/pages/notice/details.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "公告",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"usingComponents": {
|
||||
"mp-html": "../../uni_modules/mp-html/components/mp-html/mp-html"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/notice/details.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/notice/details.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view style="padding:30rpx"><view style="font-size:34rpx">{{a}}</view><view style="height:20rpx"></view><view style="color:#999;font-size:30rpx">发布时间:{{b}}</view><view style="height:20rpx"></view><video wx:if="{{c}}" style="width:690rpx;height:388rpx" poster="{{d}}" src="{{e}}" direction="{{90}}"></video><view style="height:20rpx"></view><view><mp-html wx:if="{{f}}" u-i="1c73d952-0" bind:__l="__l" u-p="{{f}}"/></view><view style=""></view></view>
|
||||
0
unpackage/dist/dev/mp-weixin/pages/notice/details.wxss
vendored
Normal file
0
unpackage/dist/dev/mp-weixin/pages/notice/details.wxss
vendored
Normal file
101
unpackage/dist/dev/mp-weixin/pages/notice/notice.js
vendored
Normal file
101
unpackage/dist/dev/mp-weixin/pages/notice/notice.js
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const api_index = require("../../api/index.js");
|
||||
if (!Array) {
|
||||
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
(_easycom_wd_navbar2 + _easycom_z_paging2)();
|
||||
}
|
||||
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
|
||||
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
if (!Math) {
|
||||
(_easycom_wd_navbar + _easycom_z_paging)();
|
||||
}
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "notice",
|
||||
setup(__props) {
|
||||
const active = common_vendor.ref(1);
|
||||
const categoryId = common_vendor.ref("");
|
||||
const paging = common_vendor.ref(null);
|
||||
const dataList = common_vendor.ref([]);
|
||||
const noticeCateList = common_vendor.ref([]);
|
||||
common_vendor.onLoad(() => {
|
||||
api_index.api.noticeCatePage().then((res) => {
|
||||
noticeCateList.value = res.list;
|
||||
});
|
||||
});
|
||||
const toDeitl = (item) => {
|
||||
if (active.value == 1) {
|
||||
common_vendor.index.showModal({
|
||||
title: "通知",
|
||||
content: item.content,
|
||||
showCancel: false
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/notice/details?id=" + item.id
|
||||
});
|
||||
}
|
||||
};
|
||||
const activeChange = (e, cateId) => {
|
||||
active.value = e;
|
||||
categoryId.value = cateId;
|
||||
paging.value.reload();
|
||||
};
|
||||
const queryList = (pageNo, pageSize) => {
|
||||
api_index.api.noticePage({ pageNo, pageSize, type: active.value, categoryId: categoryId.value }).then((res) => {
|
||||
paging.value.complete(res.list);
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
});
|
||||
};
|
||||
const back = () => {
|
||||
common_vendor.index.navigateBack();
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(back),
|
||||
b: common_vendor.p({
|
||||
title: "公告",
|
||||
safeAreaInsetTop: true,
|
||||
["left-arrow"]: true
|
||||
}),
|
||||
c: common_vendor.n(active.value == 1 ? "active" : ""),
|
||||
d: common_vendor.o(($event) => activeChange(1, "")),
|
||||
e: common_vendor.f(noticeCateList.value, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.categoryName),
|
||||
b: common_vendor.n(active.value == 2 && categoryId.value == item.id ? "active" : ""),
|
||||
c: common_vendor.o(($event) => activeChange(2, item.id), index),
|
||||
d: index
|
||||
};
|
||||
}),
|
||||
f: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(active.value == 1 ? item.content : item.title)
|
||||
}, active.value == 2 ? {
|
||||
b: common_assets._imports_0$1
|
||||
} : {}, {
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => toDeitl(item), index)
|
||||
});
|
||||
}),
|
||||
g: common_vendor.t(active.value == 1 ? "通知" : active.value == 2 ? noticeCateList.value.find((val) => val.id == categoryId.value).categoryName : ""),
|
||||
h: active.value == 2,
|
||||
i: common_vendor.sr(paging, "1c2e4c1e-1", {
|
||||
"k": "paging"
|
||||
}),
|
||||
j: common_vendor.o(queryList),
|
||||
k: common_vendor.o(($event) => dataList.value = $event),
|
||||
l: common_vendor.p({
|
||||
["use-page-scroll"]: true,
|
||||
modelValue: dataList.value
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1c2e4c1e"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/notice/notice.js.map
|
||||
8
unpackage/dist/dev/mp-weixin/pages/notice/notice.json
vendored
Normal file
8
unpackage/dist/dev/mp-weixin/pages/notice/notice.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"wd-navbar": "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar",
|
||||
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/notice/notice.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/notice/notice.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="notice data-v-1c2e4c1e"><wd-navbar wx:if="{{b}}" class="data-v-1c2e4c1e" bindclickLeft="{{a}}" u-i="1c2e4c1e-0" bind:__l="__l" u-p="{{b}}"></wd-navbar><view class="nav-tabs data-v-1c2e4c1e"><view class="{{['tab-item', 'data-v-1c2e4c1e', c]}}" bindtap="{{d}}">通知</view><view wx:for="{{e}}" wx:for-item="item" wx:key="d" class="{{['tab-item', 'data-v-1c2e4c1e', item.b]}}" bindtap="{{item.c}}">{{item.a}}</view></view><z-paging wx:if="{{l}}" class="r data-v-1c2e4c1e" u-s="{{['d']}}" u-r="paging" bindquery="{{j}}" u-i="1c2e4c1e-1" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"><view class="p30 data-v-1c2e4c1e"><view wx:for="{{f}}" wx:for-item="item" wx:key="c" class="notice_block data-v-1c2e4c1e" bindtap="{{item.d}}"><view class="data-v-1c2e4c1e">{{g}}:{{item.a}}</view><image wx:if="{{h}}" class="data-v-1c2e4c1e" style="width:40rpx;height:40rpx" src="{{item.b}}"></image></view></view></z-paging></view>
|
||||
49
unpackage/dist/dev/mp-weixin/pages/notice/notice.wxss
vendored
Normal file
49
unpackage/dist/dev/mp-weixin/pages/notice/notice.wxss
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/* 水平间距 */
|
||||
/* 水平间距 */
|
||||
.notice.data-v-1c2e4c1e {
|
||||
/* 导航标签样式 */
|
||||
}
|
||||
.notice_block.data-v-1c2e4c1e {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 35rpx;
|
||||
width: 690rpx;
|
||||
height: 106rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
position: relative;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.notice .nav-tabs.data-v-1c2e4c1e {
|
||||
display: flex;
|
||||
/* justify-content: space-around; */
|
||||
background-color: #ffffff;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
}
|
||||
.notice .tab-item.data-v-1c2e4c1e {
|
||||
font-size: 15px;
|
||||
color: #999;
|
||||
position: relative;
|
||||
padding: 0 10px;
|
||||
z-index: 9;
|
||||
}
|
||||
.notice .tab-item.active.data-v-1c2e4c1e {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
.notice .tab-item.active.data-v-1c2e4c1e::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 0rpx;
|
||||
right: 20rpx;
|
||||
width: 40rpx;
|
||||
height: 12rpx;
|
||||
background: #627c54;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
z-index: 5;
|
||||
opacity: 0.8;
|
||||
}
|
||||
Reference in New Issue
Block a user