提交 c9007f57 编写于 作者: 刘英杰's avatar 刘英杰

20241022 保存

上级 df3b1b5a
流水线 #30127 已失败
......@@ -9,6 +9,6 @@ build:
stage: publish
script:
# - remove-item -Force -Recurse D:/ASC_web/A00021/wx_news/wx*
- xcopy "dist" "D:\ASC_web\A00021\wx_news\wx\" /s/e/y/
# - xcopy "dist" "D:\ASC_web\A00021\wx_news\wx\" /s/e/y/
only:
- wx
\ No newline at end of file
# 制度文件移动端
......@@ -1781,6 +1781,16 @@
"integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"cacache": {
"version": "13.0.1",
"resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1616431156987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz",
......@@ -1807,6 +1817,53 @@
"unique-filename": "^1.1.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.4",
"resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz",
......@@ -1823,6 +1880,16 @@
"minipass": "^3.1.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"terser-webpack-plugin": {
"version": "2.3.8",
"resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz",
......@@ -1839,6 +1906,18 @@
"terser": "^4.6.12",
"webpack-sources": "^1.4.3"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
......@@ -11698,87 +11777,6 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.3.tgz",
"integrity": "sha512-THWqIsn8QRnvLl0shHYVBN9syumU8pYWEHPTmkiVGd+7K5eFNVSY6AJhRvgGF70gg1Dz+l/k8WicvFCxdEs60A==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-qr": {
"version": "4.0.6",
"resolved": "https://registry.npmmirror.com/vue-qr/-/vue-qr-4.0.6.tgz",
......
......@@ -19,7 +19,8 @@ Vue.prototype.UTIL = util;
import getBankcardinfo from 'bankcardinfo'
Vue.prototype.$getBankcardinfo = getBankcardinfo
import { Button,Icon,Form,Field,Notify,Card,Panel,Divider,SubmitBar,Tag,Cell, CellGroup,Collapse, CollapseItem,RadioGroup,Radio,Popup,Col, Row,Toast,Dialog,NavBar,Loading,Overlay,Uploader,Search,Picker,Image as VanImage,Skeleton,Tabbar, TabbarItem,ImagePreview,createApp,ActionSheet,Cascader,PullRefresh,NoticeBar,List,Step, Steps,Empty,Area,Switch,Sticky,Popover,Checkbox, CheckboxGroup,Sidebar, SidebarItem } from 'vant';
import { Button,Icon,Form,Field,Notify,Card,Panel,DropdownMenu,
DropdownItem,Divider,SubmitBar,Tag,Cell, CellGroup,Collapse, CollapseItem,RadioGroup,Radio,Popup,Col, Row,Toast,Dialog,NavBar,Loading,Overlay,Uploader,Search,Picker,Image as VanImage,Skeleton,Tabbar, TabbarItem,ImagePreview,createApp,ActionSheet,Cascader,PullRefresh,NoticeBar,List,Step, Steps,Empty,Area,Switch,Sticky,Popover,Checkbox, CheckboxGroup,Sidebar, SidebarItem } from 'vant';
Vue.use(Button);
Vue.use(Icon);
......@@ -69,6 +70,8 @@ Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(Sidebar);
Vue.use(SidebarItem);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
//Toast.setDefaultOptions({ duration: 2000 });
// 生成签名插件
......
......@@ -40,6 +40,24 @@ const routes = [
keepAlive: false,
}
},
{
path: "/newsList",
name: "newsList",
component: () => import('@/views/newsList/index'),
meta: {
title: '文件列表',
keepAlive: false,
}
},
{
path: "/newsDetails",
name: "newsDetails",
component: () => import('@/views/newsDetails/index'),
meta: {
title: '文件查看',
keepAlive: false,
}
},
];
const router = new VueRouter({
......
......@@ -39,7 +39,6 @@ export default {
`REFRESHJWT-COLLECTOR`,
resp.refresh_token.token_content
); //刷新token
//解析token
GetTokenInfo().then((resp) => {
console.log('token',resp)
......@@ -61,10 +60,10 @@ export default {
window.localStorage.setItem("userInfo", JSON.stringify(userInfo));
//路由跳转
this.$router.push({
path: "/",
/* path: "/",*/
path: "newsList",
//query: {applyId: applyId,column:1},
});
})
}).catch((err) => {
......
.cardList {
box-sizing: border-box;
width: 100vw;
height: calc(100vh - 46px);
overflow: auto;
.cardListItem:nth-child(1) {
/*文章标题*/
width: 100%;
height: 120px;
background: #ffffff;
padding: 15px;
display: flex;
flex-wrap: wrap;
p {
margin: 0;
font-family: 黑体;
}
}
.cardListItem:nth-child(2) {
width: 100%;
height: 13px;
background: #F6F7F9;
}
.cardListItem:nth-child(3) {
/*文章内容*/
width: 100%;
min-height: 300px;
background: #ffffff;
padding: 15px;
box-sizing: border-box;
p {
text-align: justify
}
}
.cardListItem:nth-child(4) {
width: 100%;
height: 43px;
background: #F6F7F9;
display: flex;
align-items: center;
padding: 15px;
color: #8997A4;
}
.cardListItem:nth-child(5) {
width: 100%;
min-height: 100px;
background: #ffffff;
}
}
\ No newline at end of file
<template>
<div>
<van-sticky>
<van-nav-bar
left-arrow
left-text="返回"
title="列表"
@click-left="onClickLeft"
>
<template #title>
<div class="titleFontFamily">
信息明细
</div>
</template>
</van-nav-bar>
</van-sticky>
<!-- 学生卡片 -->
<div class="cardList">
<div class="cardListItem">
<p style="width: 100%; font-size: 16px;font-weight: 600;color: #000">移动端页脚排版</p>
<p style="width: 100%;height: 25px;color: #838383">
<span>李处长</span>
<span style="margin:0 5px;">|</span>
<span>部门:刘老师</span>
<span style="margin:0 5px;">|</span>
<span>旅游管理系</span>
</p>
<p style=" color:#C8C9CC; width: 100%;margin-top: auto;display: flex; justify-content: space-between; align-self: flex-end">
<span>2024-10-22 09:22:12</span>
<span >2024-10-22 09:22:12</span>
</p>
</div>
<div class="cardListItem"></div>
<div class="cardListItem">
<p>
这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容
这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容
这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容
这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容
这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容
这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容
这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容
这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容
这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容这是文章内容
</p>
</div>
<div class="cardListItem">
附件
</div>
<div class="cardListItem">
<van-cell >
<template #title>
<a >单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格</a>
</template>
<template #icon>
<van-icon name="arrow" />
</template>
<template #extra>
<div style="width: 40px;display: flex;justify-content: center">
<van-icon name="down" />
</div>
</template>
</van-cell>
<van-cell title="单元格" is-link />
<van-cell title="单元格" is-link />
</div>
</div>
</div>
</template>
<script>
import {MyNewsList, IssueNews, FirstColumn, SendWxMessage, SendPhoneMessage} from "@/common/api/myBaseInfo";
export default {
data() {
return {
title: "",
type_name: "",
type_id: "",
refreshing: false,
finished: false,
loading: false,
list: [],
//顶部
searchValue: "",
pageIndex: 1,
pageSize: 5,
//下拉状态(待处理、已处理、取消)
showPopover_title: false,
actions_title: [],
status_title: {text: "列表", value: ""},
//下拉状态栏目(咨询、投诉)
showPopover: false,
actions: [],
status: {text: "全部", value: ""},
};
},
created() {
//获取一级栏目
FirstColumn().then((resp) => {
//列表状态
this.actions_title = [{text: "列表", value: ""}]
resp.filter(item => {
this.actions_title.push({
text: item.field_02,
value: item.field_02
})
})
});
},
methods: {
goDetail(id, state) {
if (state == '1') {
this.$notify({type: 'danger', message: '请先撤回再编辑'});
return
}
//申请id
this.$router.push({
path: "/form",
query: {status: "edit", id: id},
});
},
//状态
handle_(label, data) {
var json = {
id: data.id
}
if (label == 'Issue') json.发布状态标识 = '1';
if (label == 'revocation') json.发布状态标识 = '0';
this.$dialog.confirm({
title: '提示',
message: label == 'Issue' ? '是否发布此新闻' : '是否撤销此新闻',
}).then(() => {
IssueNews(json).then((resp) => {
console.log(label)
if (label == 'Issue') {
this.$toast('发布成功');
this.sendPush(data);
}
if (label == 'revocation') this.$toast('撤回成功');
this.list = [];
this.onRefresh();
})
}).catch(() => {
// on cancel
});
},
//////////////消息推送,手机短信////////////
sendPush(data) {
var curl;
if (sessionStorage.getItem('wx-news-type') == 'asc') curl = window.location.protocol + "//" + window.location.host + "/wx/wxaic/Teacher/AICNotice/SSO/sso.html?id=" + data.id;
if (sessionStorage.getItem('wx-news-type') == 'aic') curl = window.location.protocol + "//" + window.location.host + "/eicrs/Home/wxAccInt?Redirect=" + window.location.protocol + "//" + window.location.host + "/WxAIC/AICNotice/wxacc.ashx?links=~/showContent.aspx?id=" + data.id;
//推送
var json = {
news_id: data.id,
title: "您有一条新的 《通知消息》",
content: data.标题,
// curl:window.location.protocol + "//" + window.location.host + "/wx/eicrs/Home/wxAccInt?Redirect=" + window.location.protocol + "//" + window.location.host + "/wx/WxAIC/TeaCher/AICNotice/showContent.aspx?id=" + data.id,//ASC
// curl:window.location.protocol + "//" + window.location.host + "/eicrs/Home/wxAccInt?Redirect=" + window.location.protocol + "//" + window.location.host + "/WxAIC/AICNotice/wxacc.ashx?links=~/showContent.aspx?id=" + data.id,//AIC
//curl:"https://asc.hnasct.cn/wx/eicrs/Home/wxAccInt?Redirect=https://asc.hnasct.cn/wx/WxAIC/TeaCher/AICNotice/showContent.aspx?id=" + resp,
curl: curl,
remark: ""
}
//微信消息推送
SendWxMessage(json)
var json2 = {
news_id: data.id,
title: data.标题,
content: "",
curl: "",
remark: ""
}
//手机短信
//SendPhoneMessage(json2)
},
//下拉刷新
onRefresh() {
// 清空列表数据
this.finished = false;
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
this.loading = true;
this.pageIndex = 1;
this.onLoad();
},
//列表
onLoad() {
//发布状态
this.actions = [
{text: "全部", value: ""},
{text: "待发布", value: 0},
{text: "已发布", value: 1},
];
MyNewsList({
column: this.status_title.value,
state: this.status.value,
query: this.searchValue,
pageIndex: this.pageIndex,
pageSize: this.pageSize,
}).then((resp) => {
setTimeout(() => {
if (this.refreshing) {
this.list = [];
this.refreshing = false;
}
if (resp.data.length == 0) {
this.finished = true;
this.refreshing = false;
return;
}
resp.data.forEach((item) => {
// for(var i=1;i<11;i++){
// this.list.push(item);
// }
this.list.push(item);
});
this.pageIndex++;
this.loading = false;
}, 500);
console.log("this.pageIndex", this.pageIndex);
});
},
//搜索
doSearch(val) {
this.pageIndex = 1;
this.list = [];
this.finished = false;
this.loading = true;
this.onLoad();
},
onClickLeft() {
this.$router.replace("newsList");
},
//////////////搜索//////////////////
//发布状态
onSelect(action) {
console.log(action);
this.pageIndex = 1;
this.list = [];
this.finished = false;
this.loading = true;
this.status = action;
this.onLoad();
},
//点击列表选项
onSelect_title(action) {
console.log(action);
this.pageIndex = 1;
this.list = [];
this.finished = false;
this.loading = true;
this.status_title = action;
this.onLoad();
},
},
};
</script>
<style>
.titleFontFamily {
font-family: 黑体;
}
</style>
<style lang="less" scoped>
@import "index.css";
.list {
border-radius: 8px;
overflow: hidden;
margin-bottom: 15px;
box-shadow: 0 0 8px rgba(0, 0, 0, .1);
.van-cell-group {
overflow: auto;
}
.cellStyle_up {
font-size: 15px;
.van-cell__title {
color: #787879;
}
}
.cellStyle_middle {
padding: 4px 16px 4px;
font-size: 15px;
.van-cell__title {
color: #787879;
}
.reason {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1; /*超出几行后省略号*/
overflow: hidden;
}
}
.cellStyle_down {
padding: 1px 16px 10px;
font-size: 15px;
.van-cell__title {
color: #787879;
}
}
.van-cell__value {
font-size: 16px;
color: #525252;
}
}
.btn {
color: #01adff;
border: 1px solid #01adff;
border-radius: 20px;
font-weight: 600;
font-size: 15px;
}
.geese-card-tips {
position: absolute;
right: -50px;
top: -3px;
width: 100px;
height: 28px;
background: #4483eb;
color: #fff;
text-align: center;
line-height: 30px;
font-size: 12px;
transform: rotate(40deg);
-ms-transform: rotate(40deg);
-moz-transform: rotate(40deg);
-webkit-transform: rotate(40deg);
-o-transform: rotate(40deg);
}
/deep/ .van-field__control {
font-size: 14px;
}
/deep/.van-cell {
position: relative;
display: -webkit-box;
display: -webkit-flex;
display: flex;
box-sizing: border-box;
width: 100%;
padding: 10px 16px;
overflow: hidden;
color: #323233;
font-size: 14px !important;
min-height: 49px;
background-color: #fff;
}
/deep/.van-cell__title, .van-cell__value {
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
/* height: 50px; */
line-height: 1;
}
</style>
\ No newline at end of file
<template>
<div>
<van-sticky>
<van-nav-bar
title="列表"
left-text="返回"
left-arrow
@click-left="onClickLeft"
>
<template #title>
<div>
<!-- <van-popover
v-model="showPopover_title"
trigger="click"
theme="dark"
placement="bottom"
:actions="actions_title"
@select="onSelect_title"
>
<template #reference>
<div>{{status_title.text}}<van-icon name="filter-o" size="18"/></div>
</template>
</van-popover>-->
<van-dropdown-menu :z-index="999" color="#1890FF">
<van-dropdown-item v-model="search.value1" :options="search.option1" />
</van-dropdown-menu>
</div>
</template>
</van-nav-bar>
<van-search
v-model="searchValue"
placeholder="请输入关键字搜索"
@input="doSearch"
:clearable="true"
background="#fff"
>
</van-search>
</van-sticky>
<!-- 学生卡片 -->
<div class="cardList">
<van-cell-group>
<van-cell >
<template #title>
<a >单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格单元格</a>
</template>
<template #icon>
<div style="width: 40px;height: 100%; display: flex;justify-content: center;align-items: center">
<van-icon name="down" />213
</div>
</template>
<template #extra>
<div style="width: 40px;height: 100%; display: flex;justify-content: center;align-items: center">
<van-icon name="down" />123
</div>
</template>
</van-cell>
<van-cell title="单元格" is-link />
<van-cell title="单元格" is-link />
</van-cell-group>
<!-- <van-pull-refresh
v-model="refreshing"
@refresh="onRefresh"
success-text="刷新成功"
>
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div
class="list"
v-for="(item, index) in list"
:key="index"
>
<van-image
width="55"
height="55"
style="position: absolute;right: 0;z-index: 1;"
:src="item.发布状态标识 == '0'?require('@/assets/images/svg/待发布.svg'):require('@/assets/images/svg/已发布.svg')"
/>
<van-cell-group>
<van-cell :border="true">
<template #title>
<div style="font-size: 16px;min-width: 300px">
<div>{{item.标题}}</div>
</div>
</template>
</van-cell>
<div style="margin: 12px 0;">
<van-cell
title="栏目"
:value="item.一级栏目名"
:border="false"
class="cellStyle_middle"
/>
<van-cell
title="日期"
:value="item.日期"
:border="false"
class="cellStyle_middle"
/>
<van-cell
title="发布时间"
:value="item.发布时间"
:border="false"
class="cellStyle_middle"
/>
</div>
<van-row style="margin: 12px" gutter="20">
<van-col span="12"><van-button block round plain type="info" class="btn"
@click="goDetail(item.id,item.发布状态标识)" >编辑</van-button></van-col>
<van-col span="12">
<van-button block round plain type="info" class="btn" @click="handle_('Issue',item)" v-if="item.发布状态标识 == 0">发布</van-button>
<van-button block round plain type="info" class="btn" @click="handle_('revocation',item)" v-if="item.发布状态标识 == 1">撤回</van-button>
</van-col>
</van-row>
</van-cell-group>
</div>
</van-list>
</van-pull-refresh>-->
</div>
</div>
</template>
<script>
import { MyNewsList,IssueNews,FirstColumn,SendWxMessage,SendPhoneMessage } from "@/common/api/myBaseInfo";
export default {
data() {
return {
search:{
option1: [
{ text: '全部商品', value: 0 },
{ text: '新款商品', value: 1 },
{ text: '活动商品', value: 2 },
],
value1:0
},
title: "",
type_name: "",
type_id: "",
refreshing: false,
finished: false,
loading: false,
list: [],
//顶部
searchValue: "",
pageIndex: 1,
pageSize: 5,
//下拉状态(待处理、已处理、取消)
showPopover_title:false,
actions_title:[],
status_title:{ text: "列表", value: "" },
//下拉状态栏目(咨询、投诉)
showPopover: false,
actions: [],
status: { text: "全部", value: "" },
};
},
created() {
//获取一级栏目
FirstColumn().then((resp) => {
//列表状态
this.actions_title = [{ text: "列表", value: "" }]
resp.filter(item=>{
this.actions_title.push({
text:item.field_02,
value:item.field_02
})
})
});
},
methods: {
goDetail(id,state){
if(state == '1') {
this.$notify({ type: 'danger', message: '请先撤回再编辑' });
return
}
//申请id
this.$router.push({
path: "/form",
query: { status:"edit", id:id},
});
},
//状态
handle_(label,data){
var json={
id:data.id
}
if(label == 'Issue') json.发布状态标识 = '1';
if(label == 'revocation') json.发布状态标识 = '0';
this.$dialog.confirm({
title: '提示',
message: label == 'Issue'?'是否发布此新闻':'是否撤销此新闻',
}).then(() => {
IssueNews(json).then((resp) => {
console.log(label)
if(label == 'Issue'){
this.$toast('发布成功');
this.sendPush(data);
}
if(label == 'revocation') this.$toast('撤回成功');
this.list = [];
this.onRefresh();
})
}).catch(() => {
// on cancel
});
},
//////////////消息推送,手机短信////////////
sendPush(data){
var curl;
if(sessionStorage.getItem('wx-news-type')=='asc') curl = window.location.protocol + "//" + window.location.host + "/wx/wxaic/Teacher/AICNotice/SSO/sso.html?id=" + data.id;
if(sessionStorage.getItem('wx-news-type')=='aic') curl = window.location.protocol + "//" + window.location.host + "/eicrs/Home/wxAccInt?Redirect=" + window.location.protocol + "//" + window.location.host + "/WxAIC/AICNotice/wxacc.ashx?links=~/showContent.aspx?id=" + data.id;
//推送
var json={
news_id:data.id,
title:"您有一条新的 《通知消息》",
content:data.标题,
// curl:window.location.protocol + "//" + window.location.host + "/wx/eicrs/Home/wxAccInt?Redirect=" + window.location.protocol + "//" + window.location.host + "/wx/WxAIC/TeaCher/AICNotice/showContent.aspx?id=" + data.id,//ASC
// curl:window.location.protocol + "//" + window.location.host + "/eicrs/Home/wxAccInt?Redirect=" + window.location.protocol + "//" + window.location.host + "/WxAIC/AICNotice/wxacc.ashx?links=~/showContent.aspx?id=" + data.id,//AIC
//curl:"https://asc.hnasct.cn/wx/eicrs/Home/wxAccInt?Redirect=https://asc.hnasct.cn/wx/WxAIC/TeaCher/AICNotice/showContent.aspx?id=" + resp,
curl:curl,
remark:""
}
//微信消息推送
SendWxMessage(json)
var json2={
news_id:data.id,
title:data.标题,
content:"",
curl:"",
remark:""
}
//手机短信
//SendPhoneMessage(json2)
},
//下拉刷新
onRefresh() {
// 清空列表数据
this.finished = false;
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
this.loading = true;
this.pageIndex = 1;
this.onLoad();
},
//列表
onLoad() {
//发布状态
this.actions = [
{ text: "全部", value: "" },
{ text: "待发布", value: 0 },
{ text: "已发布", value: 1 },
];
MyNewsList({
column: this.status_title.value,
state: this.status.value,
query: this.searchValue,
pageIndex: this.pageIndex,
pageSize: this.pageSize,
}).then((resp) => {
setTimeout(() => {
if (this.refreshing) {
this.list = [];
this.refreshing = false;
}
if (resp.data.length == 0) {
this.finished = true;
this.refreshing = false;
return;
}
resp.data.forEach((item) => {
// for(var i=1;i<11;i++){
// this.list.push(item);
// }
this.list.push(item);
});
this.pageIndex++;
this.loading = false;
}, 500);
console.log("this.pageIndex", this.pageIndex);
});
},
//搜索
doSearch(val) {
this.pageIndex = 1;
this.list = [];
this.finished = false;
this.loading = true;
this.onLoad();
},
onClickLeft() {
this.$router.replace("/");
},
//////////////搜索//////////////////
//发布状态
onSelect(action) {
console.log(action);
this.pageIndex = 1;
this.list = [];
this.finished = false;
this.loading = true;
this.status = action;
this.onLoad();
},
//点击列表选项
onSelect_title(action) {
console.log(action);
this.pageIndex = 1;
this.list = [];
this.finished = false;
this.loading = true;
this.status_title = action;
this.onLoad();
},
},
};
</script>
<style lang="less" scoped>
.cardList {
padding: 15px 0 0;
/deep/.van-cell {
position: relative;
display: -webkit-box;
display: -webkit-flex;
display: flex;
box-sizing: border-box;
width: 100%;
padding: 10px 16px;
overflow: hidden;
color: #323233;
font-size: 14px !important;
min-height: 59px;
background-color: #fff;
}
}
.list {
border-radius: 8px;
overflow: hidden;
margin-bottom: 15px;
box-shadow: 0 0 8px rgba(0,0,0,.1);
.van-cell-group {
overflow: auto;
}
.cellStyle_up {
font-size: 15px;
.van-cell__title {
color: #787879;
}
}
.cellStyle_middle {
padding: 4px 16px 4px;
font-size: 15px;
.van-cell__title {
color: #787879;
}
.reason {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1; /*超出几行后省略号*/
overflow: hidden;
}
}
.cellStyle_down {
padding: 1px 16px 10px;
font-size: 15px;
.van-cell__title {
color: #787879;
}
}
.van-cell__value {
font-size: 16px;
color: #525252;
}
}
.btn{
color: #01adff;
border: 1px solid #01adff;
border-radius: 20px;
font-weight: 600;
font-size: 15px;
}
.geese-card-tips {
position: absolute;
right: -50px;
top: -3px;
width: 100px;
height: 28px;
background: #4483eb;
color: #fff;
text-align: center;
line-height: 30px;
font-size: 12px;
transform: rotate(40deg);
-ms-transform: rotate(40deg);
-moz-transform: rotate(40deg);
-webkit-transform: rotate(40deg);
-o-transform: rotate(40deg);
}
/deep/.van-field__control{
font-size: 14px;
}
</style>
\ No newline at end of file
......@@ -2,9 +2,9 @@ module.exports = {
// 启动配置
devServer: {
host: 'localhost',
port: 8086,
host:'192.168.1.83',
host:'0.0.0.0',
// 跨域配置
proxy: {
'/wx_news': {
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或