提交 a5d988c9 编写于 作者: 麦嘉得's avatar 麦嘉得

①开发对接联调移动端新闻接口v230111

上级 233fa748
此差异已折叠。
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
}, },
"dependencies": { "dependencies": {
"@vant/area-data": "^1.3.1", "@vant/area-data": "^1.3.1",
"ant-design-vue": "^1.7.8",
"axios": "^0.21.1", "axios": "^0.21.1",
"bankcardinfo": "^2.0.6", "bankcardinfo": "^2.0.6",
"core-js": "^3.6.5", "core-js": "^3.6.5",
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
"vue-qr": "^4.0.6", "vue-qr": "^4.0.6",
"vue-router": "^3.2.0", "vue-router": "^3.2.0",
"vuex": "^3.4.0", "vuex": "^3.4.0",
"wangeditor": "^4.7.15",
"weixin-js-sdk": "^1.6.0" "weixin-js-sdk": "^1.6.0"
}, },
"devDependencies": { "devDependencies": {
...@@ -34,7 +36,7 @@ ...@@ -34,7 +36,7 @@
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.3.1", "eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"less": "^4.1.2", "less": "^4.1.3",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"prettier": "^2.2.1", "prettier": "^2.2.1",
"sass": "^1.26.5", "sass": "^1.26.5",
......
...@@ -21,6 +21,7 @@ body { ...@@ -21,6 +21,7 @@ body {
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
color: #2c3e50; color: #2c3e50;
height: 100%; height: 100%;
background-color: #f2f3f5;
.van-cell{ .van-cell{
font-size: 16px font-size: 16px
...@@ -29,8 +30,8 @@ body { ...@@ -29,8 +30,8 @@ body {
// background-color: #ededed; // background-color: #ededed;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 15px; //padding: 15px;
background: #fff;
.nav-btn { .nav-btn {
display: flex; display: flex;
...@@ -89,13 +90,16 @@ body { ...@@ -89,13 +90,16 @@ body {
// } // }
} }
/* fade-transform */
.fade-enter-active, </style>
.fade-leave-active { <style>
transition: opacity 0.2s ease; /* fade-transform */
} .fade-enter-active,
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ { .fade-leave-active {
opacity: 0; transition: opacity 0.2s ease;
} }
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
}
</style> </style>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37.66 37.66"><defs><style>.cls-1{fill:#ee0a24;}.cls-2{fill:#fff;}</style></defs><title>不通过</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><polygon class="cls-1" points="23.33 0 0 0 37.66 37.66 37.66 14.34 23.33 0"/><path class="cls-2" d="M18.14,1.25l5.5,5.68L23,7.52,21,5.39c-.4.14-.77.24-1.1.32L15.4,10l-.63-.65,3.57-3.46a12.79,12.79,0,0,1-4.13-.46l.14-1a10.07,10.07,0,0,0,5.93.16L17.52,1.84ZM20.22,7a19.62,19.62,0,0,1,.06,3.57l-1,0a16.76,16.76,0,0,0,0-3.58Z"/><path class="cls-2" d="M23,17.59l-1.13-1.2a6.42,6.42,0,0,1-.92-1.16,2.18,2.18,0,0,1-.21-1.15.54.54,0,0,0-.07-.41c-.14-.13-.66-.08-1.59.15L19,13a3.84,3.84,0,0,1,1.87-.09l1.87-1.81-.86-.88.58-.57,1.43,1.48L21.42,13.5a1.28,1.28,0,0,1,0,.19,2.59,2.59,0,0,0,.07.86,3.2,3.2,0,0,0,.68,1l1.28,1.35c.21.21.53.54,1,1,.29.29.55.53.78.73l-.77.45Zm4.16-6.25-1.24-1.27.52-.51,3.52,3.63-.45.43a10.59,10.59,0,0,1-2-.41v.07l1.29,1.33L25.8,17.45a.77.77,0,0,1-1.22-.08l-.49-.51.39-.63.43.49a.28.28,0,0,0,.44,0l.33-.32-.92-1L23.68,16.5l-.56-.57,1.08-1L23.3,14,22.21,15l-.58-.59L25.2,11l1.47,1.52c-.08-.41-.17-.8-.27-1.16ZM24.27,13l-.46.45.9.93.47-.45Zm.93-5a12,12,0,0,1,.05,2.14l-.87,0a9.66,9.66,0,0,0,0-2.15Zm.49,5.39.46-.45-.9-.93-.46.45Zm0,1.07-.46.45.92.95.46-.45Zm1.44.46.46-.45-.92-.95-.46.44Zm1.41-2.12-1.43-1.48c.1.51.17.9.21,1.16A6.45,6.45,0,0,0,28.58,12.85Z"/><path class="cls-2" d="M29.5,24.33c-.23-.23-.62-.64-1.18-1.24a6.67,6.67,0,0,1-.95-1.21,2.1,2.1,0,0,1-.24-1.17.55.55,0,0,0-.09-.43c-.14-.14-.68-.08-1.63.17l0-.88a3.88,3.88,0,0,1,1.91-.09l1.86-1.81-.87-.9.6-.57,1.45,1.49-2.5,2.43a.67.67,0,0,1,0,.2,2.45,2.45,0,0,0,.1.88,3.57,3.57,0,0,0,.73,1.08L30,23.68l.89.91.74.68-.79.46Zm-.2-2,.47-.72a11.8,11.8,0,0,0,.78.89.33.33,0,0,0,.53,0L33.7,20,31.29,17.5l.62-.59,2.41,2.48,1-1,.61.63-1,1,.91.93-.61.6-.91-.94L31.54,23.3a.84.84,0,0,1-1.34,0Zm2.32-3.54A14.34,14.34,0,0,1,31.27,21l-.84-.16a14.88,14.88,0,0,0,.41-2.19Zm-.05-4.17a12.07,12.07,0,0,1,.07,2.13l-.9,0a10.1,10.1,0,0,0,0-2.14Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37.66 37.66"><defs><style>.cls-1{fill:#1989fa;}.cls-2{fill:#fff;}</style></defs><title>待审核</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><polygon class="cls-1" points="23.33 0 0 0 37.66 37.66 37.66 14.34 23.33 0"/><path class="cls-2" d="M18.52,4.5A7.34,7.34,0,0,1,17,4.87L13.65,8.13l-.59-.6,2.67-2.59c-.4,0-.82-.05-1.27-.11l.42-.76a7.21,7.21,0,0,0,3.38-.35ZM17.16,5.94l2.43,2.51L20,8l.6.62-.43.43.69.72-.58.57-.7-.72-1.56,1.51a.89.89,0,0,1-1.42,0l-.91-.94.46-.72c.27.33.53.63.79.89a.39.39,0,0,0,.63,0L19,9,16.57,6.51Zm2.67-3.15A7.15,7.15,0,0,1,16.22,3l.43-.77A6.1,6.1,0,0,0,19.55,2ZM17.24,7.52a13,13,0,0,1-.14,1.77l-.82-.15a14,14,0,0,0,.18-1.8Zm4.67-3,.58.6-.66.64,1.39,1.44-.58.55L21.25,6.31,20.57,7l1.66,1.71-.59.56-3.84-4,.58-.57L20,6.37l.68-.66L19.29,4.29l.58-.56,1.37,1.42Z"/><path class="cls-2" d="M22.51,14.77l-1.29-1.33-.35.35-.6-.62L23.57,10l1.88,1.94.57-.56.6.62-.57.56,1.9,2-3.27,3.18-.6-.62.34-.32-1.31-1.35L21.8,16.66,21.2,16Zm-.1-2.48-.61.59,1.28,1.33.62-.59Zm2.46.19-1.29-1.32-.62.6,1.29,1.33Zm5,1.15-1.25,1.21-.59-.6.67-.66L24.42,9.17l-.7.69-.59-.61L24.41,8l2.39,2.47A5.77,5.77,0,0,0,27,9.9l.75.57a6.76,6.76,0,0,1-.35.65Zm-6.18,1.2L25,16.18l.62-.59L24.3,14.24Zm2.46.22.63-.6L25.47,13.1l-.62.61Z"/><path class="cls-2" d="M26.45,21.41l-.59-.6,3.05-3a10.4,10.4,0,0,1-2.26.8l.39-.88a8.79,8.79,0,0,0,3-1.12l-.8-.83.61-.58.83.86L32,14.9l.59.6L31.3,16.7l.7.73-.6.58-.7-.73-.36.35q-.06.9-.24,2l-.87.17c.16-.56.3-1.06.41-1.5Zm.82.82.2-.86a8.16,8.16,0,0,0,6.22.64l.24.78a9.78,9.78,0,0,1-2.55.4,14.19,14.19,0,0,1-.06,2.31l-.91,0a12.83,12.83,0,0,0,.21-2.31A9,9,0,0,1,27.27,22.23ZM32.69,17l1.52,1.57a4.28,4.28,0,0,0,.3-.84l.73.53a7.28,7.28,0,0,1-.43.92l1.39,1.44-.57.56-1.76-1.81a9.64,9.64,0,0,1-2,.34c.32.3.69.64,1.11,1,.4-.07.78-.16,1.14-.26l.22.77a7.31,7.31,0,0,1-5.49-.3l.19-.85a6.48,6.48,0,0,0,3,.71l-1.37-1.27.39-.62a.77.77,0,0,0,.17.07,5.46,5.46,0,0,0,2.08-.24l-1.13-1.16Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37.66 37.66"><defs><style>.cls-1{fill:#07c160;}.cls-2{fill:#fff;}</style></defs><title>通过</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><polygon class="cls-1" points="23.33 0 0 0 37.66 37.66 37.66 14.34 23.33 0"/><path class="cls-2" d="M19.46,13.89,18.33,12.7a6.81,6.81,0,0,1-.91-1.17,2.16,2.16,0,0,1-.21-1.14.52.52,0,0,0-.08-.41c-.13-.14-.66-.09-1.58.15l0-.88a3.69,3.69,0,0,1,1.87-.08l1.87-1.81-.86-.89L19,5.91l1.43,1.47L17.92,9.8a.67.67,0,0,1,0,.2,2.38,2.38,0,0,0,.06.86,3.56,3.56,0,0,0,.69,1L20,13.24l1,1c.28.29.54.54.77.74l-.77.45Zm4.16-6.24L22.38,6.37l.53-.5,3.51,3.62L26,9.92a10,10,0,0,1-2-.41v.07l1.29,1.33L22.3,13.75a.76.76,0,0,1-1.21-.07l-.49-.51.39-.64.43.49a.27.27,0,0,0,.43,0l.34-.33-.92-1-1.09,1.05-.55-.57,1.08-1.05-.9-.94-1.1,1.07-.58-.6L21.7,7.26l1.47,1.52a11.71,11.71,0,0,0-.26-1.16ZM20.78,9.31l-.46.45.9.93.46-.45Zm.92-4.95a10.39,10.39,0,0,1,.05,2.14l-.86,0a9.82,9.82,0,0,0,0-2.16Zm.5,5.38.46-.44-.9-.94-.47.45Zm0,1.08-.46.45.92,1,.46-.45Zm1.44.45.46-.45-.92-1-.47.45Zm1.41-2.11L23.65,7.68c.11.5.18.89.22,1.16A7.05,7.05,0,0,0,25.09,9.16Z"/><path class="cls-2" d="M26,20.64,24.83,19.4a7.16,7.16,0,0,1-1-1.21A2.3,2.3,0,0,1,23.63,17a.52.52,0,0,0-.09-.42c-.13-.14-.68-.09-1.62.16l0-.87a3.91,3.91,0,0,1,1.91-.1L25.67,14l-.87-.9.59-.58L26.85,14l-2.51,2.43a.43.43,0,0,1,0,.2,2.49,2.49,0,0,0,.09.88,3.62,3.62,0,0,0,.74,1.07c.49.53.94,1,1.33,1.41l.89.9.74.68-.78.47Zm-.19-2,.46-.72c.27.32.53.62.79.89a.33.33,0,0,0,.53,0l2.62-2.54L27.8,13.81l.61-.6,2.41,2.49,1-1,.61.63-1,1,.91.94-.61.6-.91-.94L28,19.61a.84.84,0,0,1-1.33,0Zm2.31-3.54a14.34,14.34,0,0,1-.35,2.16l-.83-.17a15.73,15.73,0,0,0,.41-2.19Zm0-4.17a11,11,0,0,1,.06,2.12h-.89a9.62,9.62,0,0,0,0-2.15Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><style>.cls-1{fill:#07c160;}.cls-2,.cls-3{fill:#fff;}.cls-2{opacity:0.14;}</style></defs><title>咨询</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><circle class="cls-1" cx="12" cy="12" r="12"/><path class="cls-2" d="M24,12a12.24,12.24,0,0,0-.18-2A11.17,11.17,0,0,0,7.75,20a11.29,11.29,0,0,0,.51,3.36A12.16,12.16,0,0,0,12,24,12,12,0,0,0,24,12Z"/><path class="cls-3" d="M15.11,15.62a2.07,2.07,0,0,0,.31-1.1,2.16,2.16,0,0,0-2.14-2.15,2.15,2.15,0,1,0,1.27,3.87l1,1a.43.43,0,0,0,.6,0h0a.43.43,0,0,0,0-.6l-1-1ZM12,14.74a1.33,1.33,0,1,1,1.09,1.09A1.35,1.35,0,0,1,12,14.74Z"/><path class="cls-3" d="M16.09,6.51H7.91a.4.4,0,0,0-.41.4V17.45a.41.41,0,0,0,.41.41h4a.41.41,0,0,0,.41-.41h0A.41.41,0,0,0,12,17H8.33V7.33h7.35v5.11a.41.41,0,0,0,.41.41h0a.41.41,0,0,0,.41-.41V6.91A.4.4,0,0,0,16.09,6.51Z"/><rect class="cls-3" x="9.37" y="10.68" width="3.25" height="0.82" rx="0.41"/><rect class="cls-3" x="9.37" y="8.64" width="5.24" height="0.82" rx="0.41"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><style>.cls-1{fill:#1989fa;}.cls-2,.cls-3{fill:#fff;}.cls-2{opacity:0.14;}</style></defs><title>待处理</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><circle class="cls-1" cx="12" cy="12" r="12"/><path class="cls-2" d="M24,12a12.24,12.24,0,0,0-.18-2A11.17,11.17,0,0,0,7.75,20a11.29,11.29,0,0,0,.51,3.36A12.16,12.16,0,0,0,12,24,12,12,0,0,0,24,12Z"/><path class="cls-3" d="M9.74,10.28a.44.44,0,0,0-.44.43.44.44,0,0,0,.44.44H13.9a.44.44,0,0,0,.43-.44.43.43,0,0,0-.43-.43Z"/><path class="cls-3" d="M11.92,12.84a.44.44,0,0,0-.44-.43H9.78a.44.44,0,0,0,0,.87h1.7A.44.44,0,0,0,11.92,12.84Z"/><path class="cls-3" d="M10.57,15.27a.43.43,0,0,0,.43-.43.44.44,0,0,0-.43-.44H9.78a.44.44,0,0,0-.43.44.43.43,0,0,0,.43.43Z"/><path class="cls-3" d="M14.79,12.35a3,3,0,1,0,3,3A3,3,0,0,0,14.79,12.35Zm0,5.14a2.14,2.14,0,1,1,2.14-2.13A2.13,2.13,0,0,1,14.79,17.49Z"/><path class="cls-3" d="M15.48,15.16H15v-.79a.44.44,0,0,0-.44-.43.43.43,0,0,0-.43.43V15.6a.43.43,0,0,0,.43.43h1a.43.43,0,0,0,.43-.43A.44.44,0,0,0,15.48,15.16Z"/><path class="cls-3" d="M10.68,16.47H7.8V8.05H9v.37a.78.78,0,0,0,.78.78h4.13a.78.78,0,0,0,.78-.78V8.05h1.22V11.2a.44.44,0,0,0,.88,0V8A.79.79,0,0,0,16,7.18H14.66V6.81A.78.78,0,0,0,13.88,6H9.75A.78.78,0,0,0,9,6.81v.37H7.71A.78.78,0,0,0,6.93,8v8.6a.78.78,0,0,0,.78.78h3a.43.43,0,0,0,.43-.43A.44.44,0,0,0,10.68,16.47ZM9.84,6.89h3.95V8.33H9.84Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><style>.cls-1{fill:#faab0c;}.cls-2,.cls-3{fill:#fff;}.cls-2{opacity:0.14;}</style></defs><title>投诉</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><circle class="cls-1" cx="12" cy="12" r="12"/><path class="cls-2" d="M24,12a12.24,12.24,0,0,0-.18-2A11.17,11.17,0,0,0,7.75,20a11.29,11.29,0,0,0,.51,3.36A12.16,12.16,0,0,0,12,24,12,12,0,0,0,24,12Z"/><path class="cls-3" d="M15.88,17.5H8.12a.61.61,0,0,1-.61-.62V6.74a.61.61,0,0,1,.61-.61h7.76a.61.61,0,0,1,.61.61V16.88A.61.61,0,0,1,15.88,17.5Zm-7.53-.85h7.3V7H8.35Z"/><path class="cls-3" d="M12,12.94a.5.5,0,0,1-.5-.5V8.79a.5.5,0,0,1,1,0v3.65A.5.5,0,0,1,12,12.94Z"/><circle class="cls-3" cx="12" cy="14.39" r="0.71"/></g></g></svg>
\ No newline at end of file
此差异已折叠。
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><style>.cls-1{fill:#67c23a;}.cls-2{font-size:55px;fill:#fff;font-family:SimHei;letter-spacing:-0.05em;}</style></defs><path class="cls-1" d="M123.87,0H0L200,200V76.13Z"/><text class="cls-2" transform="translate(58.39 29.48) rotate(45)">已发布</text></svg>
\ No newline at end of file
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><style>.cls-1{fill:#67c23a;}.cls-2{fill:#1890ff;}.cls-3{font-size:55px;fill:#fff;font-family:SimHei;letter-spacing:-0.05em;}</style></defs><path class="cls-1" d="M123.87,0H0L200,200V76.13Z"/><path class="cls-2" d="M123.87,0H0L200,200V76.13Z"/><text class="cls-3" transform="translate(58.39 29.48) rotate(45)">待发布</text></svg>
\ No newline at end of file
...@@ -66,6 +66,17 @@ export function upfile(data){ ...@@ -66,6 +66,17 @@ export function upfile(data){
}); });
} }
export function news_upfile(data){
var formData = new FormData();
formData.append("fileType",data.fileType);
formData.append("uploadFile",data.uploadFile);
return request({
url: `https://asc.hnasct.cn/News/WxUploadFile.ashx`,
method: 'post',
data:formData
});
}
...@@ -37,6 +37,25 @@ export function GroupList(data){ ...@@ -37,6 +37,25 @@ export function GroupList(data){
}); });
} }
//微信消息推送
export function SendWxMessage(data){
return request({
url: `/wx_news/api/Message/SendWxMessage`,
method: 'post',
data:data
});
}
//飞鸽传书短信消息推送(手机短信)
export function SendPhoneMessage(data){
return request({
url: `/wx_news/api/Message/SendPhoneMessage`,
method: 'post',
data:data
});
}
/////////////////////////新增接口v230111///////////////
//添加新闻 //添加新闻
export function addNews(data){ export function addNews(data){
return request({ return request({
...@@ -46,21 +65,38 @@ export function addNews(data){ ...@@ -46,21 +65,38 @@ export function addNews(data){
}); });
} }
//编辑新闻
//微信消息推送 export function EditNews(data){
export function SendWxMessage(data){
return request({ return request({
url: `/wx_news/api/Message/SendWxMessage`, url: `/wx_news/api/News/EditNews`,
method: 'post', method: 'post',
data:data data:data
}); });
} }
//飞鸽传书短信消息推送(手机短信) //新闻发布列表
export function SendPhoneMessage(data){ export function MyNewsList(data){
return request({ return request({
url: `/wx_news/api/Message/SendPhoneMessage`, url: `/wx_news/api/News/MyNewsList`,
method: 'get',
params:data
});
}
//根据id查询新闻详情
export function GetNewsInfo(data){
return request({
url: `/wx_news/api/News/GetNewsInfo`,
method: 'get',
params:data
});
}
//新闻发布(撤回)
export function IssueNews(data){
return request({
url: `/wx_news/api/News/IssueNews`,
method: 'post', method: 'post',
data:data data:data
}); });
} }
\ No newline at end of file
<template>
<div>
<div ref="toolbar" class="toolbar"></div>
<!-- <p> ---------------</p> -->
<div ref="editor" class="text"></div>
</div>
</template>
<script>
import E from 'wangeditor'
export default {
name: 'wangEditor',
data() {
return {
editor: null,
info: null
}
},
model: {
prop: 'value',
event: 'change'
},
props: {
value: {
type: String,
default: ''
},
isClear: {
type: Boolean,
default: false
}
},
watch: {
isClear(val) {
// 触发清除文本域内容
if (val) {
this.editor.txt.clear()
this.info = null
}
},
//value为编辑框输入的内容即父组件的v-model的值
value: function(value) {
if (value !== this.editor.txt.html()) {
this.editor.txt.html(this.value)
}
}
},
mounted() {
this.initEditor()
this.editor.txt.html(this.value)
},
// 销毁编辑器
beforeDestroy() {
this.editor.destroy()
this.editor = null
},
methods: {
initEditor() {
this.editor = new E(this.$refs.toolbar, this.$refs.editor)
this.editor.config.uploadImgShowBase64 = true // 是否设置base64存储图片
//this.editor.config.uploadImgServer = '/api/upload/uploadImg'// 配置服务器端地址
//this.editor.config.uploadImgHeaders = { }// 自定义 header
this.editor.config.uploadFileName = 'file' // 后端接受上传文件的参数名
// this.editor.config.uploadImgMaxSize = 2 * 1024 * 1024 // 将图片大小限制为 2M
this.editor.config.uploadImgMaxLength = 3 // 限制一次最多上传 3 张图片
// this.editor.config.uploadImgTimeout = 3 * 60 * 1000 // 设置超时时间
this.editor.config.showLinkImg = false //隐藏插入网络图片的功能
// 设置编辑区域高度为 500px
this.editor.config.height = 500
// 配置菜单
this.editor.config.menus = [
'head', // 标题
'bold', // 粗体
'fontSize', // 字号
'fontName', // 字体
'italic', // 斜体
'underline', // 下划线
'strikeThrough', // 删除线
'foreColor', // 文字颜色
'backColor', // 背景颜色
'link', // 插入链接
'list', // 列表
'justify', // 对齐方式
'quote', // 引用
'emoticon', // 表情
'image', // 插入图片
'table', // 表格
//'video', // 插入视频
'code', // 插入代码
'undo', // 撤销
'redo', // 重复
'fullscreen' // 全屏
]
this.editor.config.uploadImgHooks = {
// 上传图片之前
before: function(xhr) {
console.log(xhr)
// 上传之前的一些判断操作,可阻止图片上传
/* return {
prevent: true,
msg: '需要提示给用户的错误信息'
}*/
},
// 图片上传并返回了结果,图片插入已成功
success: function(xhr) {
console.log('success', xhr)
},
// 图片上传并返回了结果,但图片插入时出错了
fail: function(xhr, editor, resData) {
console.log('fail', resData)
},
// 上传图片出错,一般为 http 请求的错误
error: function(xhr, editor, resData) {
console.log('error', xhr, resData)
},
// 上传图片超时
timeout: function(xhr) {
console.log('timeout')
},
// 图片上传并返回了结果,想要自己把图片插入到编辑器中
// 例如服务器端返回的不是 { errno: 0, data: [...] } 这种格式,可使用 customInsert
customInsert: function(insertImgFn, result) {
// result 即服务端返回的接口
console.log('customInsert', result)
//insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
//我的后端接口返回的格式为{code:0,data:'url地址'}
insertImgFn(result.data)
}
}
this.editor.config.onchange = (html) => {
this.info = html
this.$emit('change', this.info) // 将内容同步到父组件中
}
// 创建富文本编辑器
this.editor.create()
}
}
}
</script>
<style lang="less">
.toolbar {
border: 1px solid #ccc;
}
.text {
border: 1px solid #ccc;
height: 400px;
}
</style>
...@@ -8,6 +8,8 @@ import api from "./interface/index" ...@@ -8,6 +8,8 @@ import api from "./interface/index"
import Vconsole from 'vconsole'; import Vconsole from 'vconsole';
//let vConsole = new Vconsole(); //let vConsole = new Vconsole();
Vue.prototype.$api = api.commonUrl Vue.prototype.$api = api.commonUrl
...@@ -71,6 +73,11 @@ Vue.use(CheckboxGroup); ...@@ -71,6 +73,11 @@ Vue.use(CheckboxGroup);
import vueEsign from 'vue-esign' import vueEsign from 'vue-esign'
Vue.use(vueEsign) Vue.use(vueEsign)
//antd 组件
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
Vue.use(Antd)
new Vue({ new Vue({
router, router,
......
...@@ -22,6 +22,24 @@ const routes = [ ...@@ -22,6 +22,24 @@ const routes = [
keepAlive: false, keepAlive: false,
} }
}, },
{
path: "/list",
name: "list",
component: () => import('@/views/list/index'),
meta: {
title: '列表',
keepAlive: false,
}
},
{
path: "/form",
name: "form",
component: () => import('@/views/form/index'),
meta: {
title: '表单',
keepAlive: false,
}
},
]; ];
const router = new VueRouter({ const router = new VueRouter({
......
...@@ -19,9 +19,9 @@ export default { ...@@ -19,9 +19,9 @@ export default {
methods: { methods: {
SSO(code, sign, timestamp) { SSO(code, sign, timestamp) {
//测试阶段 //测试阶段
//TestSSO({ card: "asc666" }).then((resp) => { TestSSO({ card: "asc666" }).then((resp) => {
//部署阶段 //部署阶段
wxSSO({ code: code, sign: sign, timestamp: timestamp }).then((resp) => { //wxSSO({ code: code, sign: sign, timestamp: timestamp }).then((resp) => {
this.UTIL.setCookie( this.UTIL.setCookie(
"XGTLTOKEN-COLLECTOR", "XGTLTOKEN-COLLECTOR",
resp.access_token.token_content resp.access_token.token_content
......
此差异已折叠。
<template> <template>
<!-- ///////////上课时间-组件///////////////// --> <!-- ///////////人员选择-组件///////////////// -->
<div style="margin-bottom: 70px"> <div style="margin-bottom: 70px">
<van-button <van-button
type="info" type="info"
......
此差异已折叠。
<template>
<div class="list">
<div class="list-item">
<van-cell size="large" is-link @click="onEdit">
<template #title>
<van-image
class="image"
round
fit="cover"
:src="require('@/assets/images/home/编辑.png')"
/>
<span class="custom-title">编辑</span>
</template>
</van-cell>
</div>
<div class="list-item">
<van-cell size="large" is-link @click="onList">
<template #title>
<van-image
class="image"
round
fit="cover"
:src="require('@/assets/images/home/列表.png')"
/>
<span class="custom-title">列表</span>
</template>
</van-cell>
</div>
</div>
</template>
<script>
export default {
name: "list",
props:["userInfo"],
data() {
return {
consultId:"",
complaintId:"",
};
},
created() {
},
methods: {
onEdit(){
this.$router.push({
path: "/form",
query: { status: "add", },
});
},
onList(){
this.$router.push({
path: "/list",
});
},
}
};
</script>
<style lang="less" scoped>
.list {
/deep/&-item {
margin-bottom: 16px;
border-radius: 12px;
overflow: hidden;
}
/deep/.van-cell {
line-height: 48px;
display: flex;
align-items: center;
.image {
width: 28px;
height: 28px;
}
.van-cell__title {
display: flex;
align-items: center;
.custom-title {
font-size: 16px;
padding-left: 10px;
width: 100px;
}
}
.van-cell__value {
font-size: 16px;
}
&::after {
content: none;
}
}
}
</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>
</div>
</template>
</van-nav-bar>
<van-search
v-model="searchValue"
show-action
placeholder="请输入姓名/内容搜索关键词"
@input="doSearch"
:clearable="true"
background="#fff"
>
<template #action>
<van-popover
v-model="showPopover"
trigger="click"
placement="bottom"
:actions="actions"
theme="dark"
@select="onSelect"
>
<template #reference>
<van-button
icon="sort"
type="default"
style="width: 120px; font-size: 15px; border-radius: 8px"
>{{ status.text }}</van-button
>
</template>
</van-popover>
</template>
</van-search>
</van-sticky>
<!-- 学生卡片 -->
<div class="cardList">
<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.id)" v-if="item.发布状态标识 == 0">发布</van-button>
<van-button block round plain type="info" class="btn" @click="handle_('revocation',item.id)" 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 } 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,id){
var json={
id: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('发布成功');
if(label == 'revocation') this.$toast('撤回成功');
this.list = [];
this.onRefresh();
})
}).catch(() => {
// on cancel
});
},
getData(){
//this.pageIndex = 1;
MyNewsList({
column: this.status_title.value,
state: this.status.value,
query: this.searchValue,
pageIndex: this.pageIndex,
pageSize: this.pageSize,
}).then((resp) => {
this.list = resp.data
})
},
//下拉刷新
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 15px 15px 15px;
}
.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
...@@ -4,7 +4,7 @@ module.exports = { ...@@ -4,7 +4,7 @@ module.exports = {
devServer: { devServer: {
host: 'localhost', host: 'localhost',
port: 8083, port: 8083,
//host:'192.168.230.1', host:'10.168.1.218',
// 跨域配置 // 跨域配置
proxy: { proxy: {
'/wx_news': { '/wx_news': {
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或