Commit 128931cb authored by jiangyipeng's avatar jiangyipeng

1

parent 762be98e
...@@ -8,5 +8,11 @@ ...@@ -8,5 +8,11 @@
}], }],
"stage-2" "stage-2"
], ],
"plugins": ["transform-vue-jsx", "transform-runtime"] "plugins": ["transform-vue-jsx", "transform-runtime",
["import", {
"libraryName": "vant",
"libraryDirectory": "es",
"style": true
}]
]
} }
...@@ -13,7 +13,7 @@ module.exports = { ...@@ -13,7 +13,7 @@ module.exports = {
proxyTable: {}, proxyTable: {},
// Various Dev Server settings // Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST host: '192.168.1.119', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false, autoOpenBrowser: false,
errorOverlay: true, errorOverlay: true,
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><script src=https://g.alicdn.com/dingding/dingtalk-jsapi/2.10.3/dingtalk.open.js></script><title>doc</title><link href=/static/css/app.1d91feed071ca5dec071916fd2c5d2fa.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.b34bc11eb8863938b23c.js></script><script type=text/javascript src=/static/js/vendor.77c8694682b600976327.js></script><script type=text/javascript src=/static/js/app.7e90fe9f1719278bcc8a.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([0],{"2NXm":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s={name:"add_file",props:["show_addFile"],data:function(){return{closeAni:!0}},methods:{closeAdd:function(){var t=this;this.closeAni=!1,setTimeout(function(){t.$emit("update:show_addFile",!1),t.closeAni=!0},300)}}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"show",rawName:"v-show",value:t.show_addFile,expression:"show_addFile"}],staticClass:"add_file"},[a("div",{staticClass:"main"},[a("div",{staticClass:"folder",class:{folder2:!t.closeAni}},[a("van-button",{attrs:{round:"",type:"info",size:"small",block:""}},[t._v("新建文件夹")])],1),t._v(" "),a("div",{staticClass:"divider",class:{divider2:!t.closeAni}},[a("van-divider",{style:{borderColor:"#cccccc",margin:"30px 0"}})],1),t._v(" "),a("div",{staticClass:"file",class:{file2:!t.closeAni}},[a("van-button",{staticStyle:{"margin-bottom":"20px"},attrs:{plain:"",round:"",type:"info",size:"small",block:""}},[t._v("新建富文本")]),t._v(" "),a("van-button",{attrs:{plain:"",round:"",type:"info",size:"small",block:""}},[t._v("新建Markdown")])],1)]),t._v(" "),a("div",{staticClass:"footer"},[a("i",{staticClass:"icon-19",class:{icon19:!t.closeAni},on:{click:t.closeAdd}})])])},staticRenderFns:[]};var n={name:"tabbar",data:function(){return{nav_index:1,show_addFile:!1}},created:function(){"/folder"!==this.$route.path&&this.$router.push({path:"/folder"})},methods:{selectNav:function(t,e){if(3===t)return this.$router.replace({path:"/wangeditor"});1===t&&(this.nav_index=t,"/folder"==this.$route.path?this.$router.replace({path:"/folder2"}):this.$router.replace({path:e}))}},components:{addFile:a("VU/8")(s,i,!1,function(t){a("sJdj")},"data-v-339b1cfe",null).exports}},c={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"tabber"},[a("div",{staticClass:"each_nav",class:{select_nav:0==t.nav_index},on:{click:function(e){return t.selectNav(0,"/test")}}},[a("i",{staticClass:"icon-59"}),t._v(" "),a("div",[t._v("最新")])]),t._v(" "),a("div",{staticClass:"each_nav",class:{select_nav:1==t.nav_index},on:{click:function(e){return t.selectNav(1,"/folder")}}},[a("i",{staticClass:"icon-37"}),t._v(" "),a("div",[t._v("文件夹")])]),t._v(" "),a("div",{staticClass:"each_nav"},[a("i",{staticClass:"icon-100",on:{click:function(e){t.show_addFile=!0}}})]),t._v(" "),a("div",{staticClass:"each_nav",class:{select_nav:2==t.nav_index},on:{click:function(e){return t.selectNav(2,"/test")}}},[a("i",{staticClass:"icon-4"}),t._v(" "),a("div",[t._v("云笔")])]),t._v(" "),a("div",{staticClass:"each_nav",class:{select_nav:3==t.nav_index},on:{click:function(e){return t.selectNav(3,"/wangeditor")}}},[a("i",{staticClass:"icon-53"}),t._v(" "),a("div",[t._v("我的")])]),t._v(" "),a("add-file",{attrs:{show_addFile:t.show_addFile},on:{"update:show_addFile":function(e){t.show_addFile=e},"update:show_add-file":function(e){t.show_addFile=e}}})],1)},staticRenderFns:[]};var l={name:"index",components:{tabbar:a("VU/8")(n,c,!1,function(t){a("WrKX")},"data-v-33e17cf6",null).exports}},o={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"index"},[e("div",{staticClass:"main"},[e("router-view")],1),this._v(" "),e("tabbar",{staticClass:"nav"})],1)},staticRenderFns:[]};var d=a("VU/8")(l,o,!1,function(t){a("4/Av")},"data-v-247b97df",null);e.default=d.exports},"4/Av":function(t,e){},WrKX:function(t,e){},sJdj:function(t,e){}});
//# sourceMappingURL=0.63cd763e8761847f0158.js.map
\ No newline at end of file
This diff is collapsed.
webpackJsonp([1],{IRGj:function(t,e){},"M+ft":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={name:"folder2",components:{folderComponent:i("s//G").a}},s={render:function(){var t=this.$createElement;return(this._self._c||t)("folder-component",{attrs:{path:"/folder"}})},staticRenderFns:[]},n=i("VU/8")(a,s,!1,null,null,null);e.default=n.exports},"s//G":function(t,e,i){"use strict";var a=i("I22p"),s={name:"folder_component",props:["path"],data:function(){return{value:"",list:[],article_list:[],parentid:"",show_loading:!1,page:1}},created:function(){var t=this.$route.query.folderid?this.$route.query.folderid:"";this.folderList(t),t&&this.articleList(t)},methods:{folderList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.show_loading=!0,a.a.folderList({parentid:e}).then(function(e){0==e.err_code&&(t.list=e.data),t.show_loading=!1})},articleList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.show_loading=!0;var i={folderid:e,pagenum:20,current:this.page};a.a.articleList(i).then(function(e){0==e.err_code&&(console.log(e,99),t.article_list=e.data),t.show_loading=!1})},clickFolder:function(t){this.$router.push({path:this.path,query:{folderid:t.folderid}})},clickArticle:function(t){1==t.type&&this.$router.push({path:"wangeditor",query:{docid:t.docid}})}}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"folder"},[i("div",{staticClass:"input"},[i("van-search",{attrs:{placeholder:"请输入搜索关键词"},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1),t._v(" "),i("div",{staticClass:"main"},[t._l(t.list,function(e,a){return i("div",{staticClass:"each_folder van-hairline--bottom",on:{click:function(i){return t.clickFolder(e)}}},[i("div",[i("span",{staticClass:"icon-107 icon107"}),t._v(" "),i("span",{staticClass:"folder_name"},[t._v(t._s(e.name))])]),t._v(" "),i("div",{staticClass:"updatetime"},[t._v(t._s(e.updatetime.substr(0,10)))])])}),t._v(" "),t._l(t.article_list,function(e,a){return i("div",{staticClass:"each_folder van-hairline--bottom",on:{click:function(i){return t.clickArticle(e)}}},[i("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[i("span",{staticClass:"folder_name",staticStyle:{margin:"0"}},[t._v(t._s(e.title))]),t._v(" "),i("span",{staticStyle:{"font-size":"12px",color:"#3396fb"}},[t._v(t._s(1==e.type?"富文本":"Markdown"))])]),t._v(" "),i("div",{staticClass:"updatetime"},[t._v(t._s(e.updatetime.substr(0,10)))])])}),t._v(" "),i("van-loading",{directives:[{name:"show",rawName:"v-show",value:t.show_loading,expression:"show_loading"}],attrs:{size:"26",vertical:"",color:"#3396fb"}})],2)])},staticRenderFns:[]};var o=i("VU/8")(s,n,!1,function(t){i("IRGj")},"data-v-02ee0f7a",null);e.a=o.exports}});
//# sourceMappingURL=1.1ed08da2d0c350e97c8b.js.map
\ No newline at end of file
This diff is collapsed.
webpackJsonp([2],{C0Ug:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={name:"folder",components:{folderComponent:i("s//G").a}},s={render:function(){var t=this.$createElement;return(this._self._c||t)("folder-component",{attrs:{path:"/folder2"}})},staticRenderFns:[]},n=i("VU/8")(a,s,!1,null,null,null);e.default=n.exports},IRGj:function(t,e){},"s//G":function(t,e,i){"use strict";var a=i("I22p"),s={name:"folder_component",props:["path"],data:function(){return{value:"",list:[],article_list:[],parentid:"",show_loading:!1,page:1}},created:function(){var t=this.$route.query.folderid?this.$route.query.folderid:"";this.folderList(t),t&&this.articleList(t)},methods:{folderList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.show_loading=!0,a.a.folderList({parentid:e}).then(function(e){0==e.err_code&&(t.list=e.data),t.show_loading=!1})},articleList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.show_loading=!0;var i={folderid:e,pagenum:20,current:this.page};a.a.articleList(i).then(function(e){0==e.err_code&&(console.log(e,99),t.article_list=e.data),t.show_loading=!1})},clickFolder:function(t){this.$router.push({path:this.path,query:{folderid:t.folderid}})},clickArticle:function(t){1==t.type&&this.$router.push({path:"wangeditor",query:{docid:t.docid}})}}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"folder"},[i("div",{staticClass:"input"},[i("van-search",{attrs:{placeholder:"请输入搜索关键词"},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1),t._v(" "),i("div",{staticClass:"main"},[t._l(t.list,function(e,a){return i("div",{staticClass:"each_folder van-hairline--bottom",on:{click:function(i){return t.clickFolder(e)}}},[i("div",[i("span",{staticClass:"icon-107 icon107"}),t._v(" "),i("span",{staticClass:"folder_name"},[t._v(t._s(e.name))])]),t._v(" "),i("div",{staticClass:"updatetime"},[t._v(t._s(e.updatetime.substr(0,10)))])])}),t._v(" "),t._l(t.article_list,function(e,a){return i("div",{staticClass:"each_folder van-hairline--bottom",on:{click:function(i){return t.clickArticle(e)}}},[i("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[i("span",{staticClass:"folder_name",staticStyle:{margin:"0"}},[t._v(t._s(e.title))]),t._v(" "),i("span",{staticStyle:{"font-size":"12px",color:"#3396fb"}},[t._v(t._s(1==e.type?"富文本":"Markdown"))])]),t._v(" "),i("div",{staticClass:"updatetime"},[t._v(t._s(e.updatetime.substr(0,10)))])])}),t._v(" "),i("van-loading",{directives:[{name:"show",rawName:"v-show",value:t.show_loading,expression:"show_loading"}],attrs:{size:"26",vertical:"",color:"#3396fb"}})],2)])},staticRenderFns:[]};var o=i("VU/8")(s,n,!1,function(t){i("IRGj")},"data-v-02ee0f7a",null);e.a=o.exports}});
//# sourceMappingURL=2.86b36fac4150598e0e03.js.map
\ No newline at end of file
This diff is collapsed.
webpackJsonp([3],{Y7I0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]};var a=n("VU/8")({name:"test"},r,!1,function(e){n("thLC")},"data-v-bdeb9c22",null);t.default=a.exports},thLC:function(e,t){}});
//# sourceMappingURL=3.bb2d4a70c579982e7d5e.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///src/pages/test.vue","webpack:///./src/pages/test.vue?e628","webpack:///./src/pages/test.vue"],"names":["pages_test","render","_h","this","$createElement","_self","_c","staticRenderFns","Component","__webpack_require__","normalizeComponent","name","ssrContext","__webpack_exports__"],"mappings":"qGAKA,ICFeA,GADEC,OAFjB,WAA0B,IAAaC,EAAbC,KAAaC,eAAkD,OAA/DD,KAAuCE,MAAAC,IAAAJ,GAAwB,QAExEK,oBCCjB,IAcAC,EAdyBC,EAAQ,OAcjCC,EFXAC,KAAA,QEaEX,GATF,EAVA,SAAAY,GACEH,EAAQ,SAaV,kBAEA,MAUeI,EAAA,QAAAL,EAAiB","file":"static/js/3.bb2d4a70c579982e7d5e.js","sourcesContent":["<template>\r\n \r\n</template>\r\n\r\n<script>\r\n export default {\r\n name: \"test\"\r\n }\r\n</script>\r\n\r\n<style scoped>\r\n\r\n</style>\n\n\n// WEBPACK FOOTER //\n// src/pages/test.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(\"div\")}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-bdeb9c22\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/pages/test.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-bdeb9c22\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./test.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./test.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./test.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-bdeb9c22\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./test.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-bdeb9c22\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/pages/test.vue\n// module id = null\n// module chunks = "],"sourceRoot":""}
\ No newline at end of file
webpackJsonp([4],{"5DMK":function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var e=i("I22p"),o={name:"wangeditor",data:function(){return{content:"",title:"",editorOption:null,docid:""}},created:function(){this.docid=this.$route.query.docid,this.articleDetail(this.docid)},methods:{articleDetail:function(t){var n=this;e.a.articleDetail({docid:t}).then(function(t){console.log(t,999),0==t.err_code&&(n.content=t.data.doc,n.title=t.data.title)})},sure:function(){this.articleEdit()},cancel:function(){this.$router.back()},articleEdit:function(){var t=this,n={docid:this.docid,title:this.title,doc:this.content,folderid:""};e.a.articleEdit(n).then(function(n){0==n.err_code&&(t.$notify({type:"success",duration:1500,message:"保存成功"}),t.$router.back())})},onEditorBlur:function(){},onEditorFocus:function(){},onEditorReady:function(){},onEditorChange:function(){}}},c={render:function(){var t=this,n=t.$createElement,i=t._self._c||n;return i("div",{staticClass:"editor"},[i("van-field",{staticClass:"doc_name",attrs:{"input-align":"center"},model:{value:t.title,callback:function(n){t.title=n},expression:"title"}}),t._v(" "),i("quill-editor",{ref:"myQuillEditor",staticClass:"quill_editor",attrs:{options:t.editorOption},on:{blur:function(n){return t.onEditorBlur(n)},focus:function(n){return t.onEditorFocus(n)},ready:function(n){return t.onEditorReady(n)},change:function(n){return t.onEditorChange(n)}},model:{value:t.content,callback:function(n){t.content=n},expression:"content"}}),t._v(" "),i("div",{staticClass:"bottom"},[i("van-button",{attrs:{plain:"",type:"info",color:"#cccccc"},on:{click:t.cancel}},[t._v("取消")]),t._v(" "),i("van-button",{attrs:{type:"info"},on:{click:t.sure}},[t._v("确定")])],1)],1)},staticRenderFns:[]};var r=i("VU/8")(o,c,!1,function(t){i("tcL5")},"data-v-2354df94",null);n.default=r.exports},tcL5:function(t,n){}});
//# sourceMappingURL=4.80a38bdce915388c7433.js.map
\ No newline at end of file
This diff is collapsed.
webpackJsonp([6],{"+cgv":function(n,e){},"02pT":function(n,e){},"1H7Z":function(n,e){},"3IMD":function(n,e){},"3f40":function(n,e){},"4qOc":function(n,e){},FhoU:function(n,e){},I22p:function(n,e,t){"use strict";var i=t("//Fk"),r=t.n(i),o=t("mtWM"),a=t.n(o),u=t("mw3O"),c=t.n(u),f={config:"index.php/login/index/config",getSsoToken:"index.php/login/index/getSsoToken",folderList:"index.php/api/index/folderList",articleList:"index.php/api/index/articleList",articleDetail:"index.php/api/index/articleDetail",articleEdit:"index.php/api/index/articleEdit"},s=new(t("7+uW").a);a.a.interceptors.request.use(function(n){return n},function(n){return r.a.reject(n)}),a.a.interceptors.response.use(function(n){return 0!==n.data.err_code&&s.$notify({type:"danger",duration:2e3,message:n.data.err_msg}),n.data},function(n){return r.a.reject(n)});var l=function(n,e){var t=f[n];return a()({method:"post",baseURL:"http://doc-phone.linanquan.com/",url:t,data:c.a.stringify(e)})};e.a={config:function(n){return l("config",n)},getSsoToken:function(n){return l("getSsoToken",n)},folderList:function(n){return l("folderList",n)},articleList:function(n){return l("articleList",n)},articleDetail:function(n){return l("articleDetail",n)},articleEdit:function(n){return l("articleEdit",n)}}},LXRP:function(n,e){},NHnr:function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});t("cOrn");var i=t("77gS"),r=(t("MY4N"),t("0zAV")),o=(t("nOaS"),t("pIDD")),a=(t("Ny/I"),t("7Tnr")),u=(t("3Lne"),t("SSsa")),c=(t("4yKu"),t("wolx")),f=t("7+uW"),s={render:function(){var n=this.$createElement,e=this._self._c||n;return e("div",{attrs:{id:"app"}},[e("router-view")],1)},staticRenderFns:[]};var l=t("VU/8")({name:"App"},s,!1,function(n){t("LXRP")},null,null).exports,p=t("/ocq"),d=(t("mvHQ"),t("I22p"),t("NYxO"));f.a.use(d.a);new d.a.Store({state:{user_info:null},mutations:{userInfo:function(n,e){n.user_info=e}}});f.a.use(p.a);var h=new p.a({routes:[{path:"/",name:"index",component:function(){return t.e(0).then(t.bind(null,"2NXm"))},children:[{path:"folder",name:"folder",component:function(){return t.e(2).then(t.bind(null,"C0Ug"))}},{path:"folder2",name:"folder2",component:function(){return t.e(1).then(t.bind(null,"M+ft"))}},{path:"wangeditor",name:"wangeditor",component:function(){return t.e(4).then(t.bind(null,"5DMK"))}},{path:"test",name:"test",component:function(){return t.e(3).then(t.bind(null,"Y7I0"))}}]}]});h.beforeEach(function(n,e,t){t()});var m=h,g=t("G0J2"),x=t.n(g);t("3f40"),t("4qOc"),t("+cgv");f.a.use(x.a,{placeholder:"请输入内容",modules:{toolbar:[[{color:[]}],["bold","italic","underline","strike"],[{header:1},{header:2}],[{header:[1,2,3,4,5,6,!1]}]]}}),f.a.use(c.a),f.a.use(u.a),f.a.use(a.a),f.a.use(o.a),f.a.use(r.a),f.a.use(i.a),f.a.config.productionTip=!1,new f.a({el:"#app",router:m,components:{App:l},template:"<App/>"})},T2s0:function(n,e){},WRFY:function(n,e){},WpgC:function(n,e){},hW8u:function(n,e){},"n/tq":function(n,e){},nsZj:function(n,e){},px3J:function(n,e){},qpP9:function(n,e){}},["NHnr"]);
//# sourceMappingURL=app.7e90fe9f1719278bcc8a.js.map
\ No newline at end of file
This diff is collapsed.
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={7:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"63cd763e8761847f0158",1:"1ed08da2d0c350e97c8b",2:"86b36fac4150598e0e03",3:"bb2d4a70c579982e7d5e",4:"80a38bdce915388c7433"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.b34bc11eb8863938b23c.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 7a97e85123a0c2701b31"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","7","exports","module","l","e","installedChunkData","Promise","resolve","promise","reject","head","document","getElementsByTagName","script","createElement","type","charset","async","timeout","nc","setAttribute","src","p","0","1","2","3","4","setTimeout","onScriptComplete","onerror","onload","clearTimeout","chunk","Error","undefined","appendChild","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAA,SAAApB,GACA,IAAAqB,EAAAhB,EAAAL,GACA,OAAAqB,EACA,WAAAC,QAAA,SAAAC,GAA0CA,MAI1C,GAAAF,EACA,OAAAA,EAAA,GAIA,IAAAG,EAAA,IAAAF,QAAA,SAAAC,EAAAE,GACAJ,EAAAhB,EAAAL,IAAAuB,EAAAE,KAEAJ,EAAA,GAAAG,EAGA,IAAAE,EAAAC,SAAAC,qBAAA,WACAC,EAAAF,SAAAG,cAAA,UACAD,EAAAE,KAAA,kBACAF,EAAAG,QAAA,QACAH,EAAAI,OAAA,EACAJ,EAAAK,QAAA,KAEArB,EAAAsB,IACAN,EAAAO,aAAA,QAAAvB,EAAAsB,IAEAN,EAAAQ,IAAAxB,EAAAyB,EAAA,aAAAtC,EAAA,KAAwEuC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,wBAAuI3C,GAAA,MAC/M,IAAAkC,EAAAU,WAAAC,EAAA,MAEA,SAAAA,IAEAhB,EAAAiB,QAAAjB,EAAAkB,OAAA,KACAC,aAAAd,GACA,IAAAe,EAAA5C,EAAAL,GACA,IAAAiD,IACAA,GACAA,EAAA,OAAAC,MAAA,iBAAAlD,EAAA,aAEAK,EAAAL,QAAAmD,GAKA,OAfAtB,EAAAiB,QAAAjB,EAAAkB,OAAAF,EAaAnB,EAAA0B,YAAAvB,GAEAL,GAIAX,EAAAwC,EAAA1C,EAGAE,EAAAyC,EAAAvC,EAGAF,EAAA0C,EAAA,SAAAtC,EAAAuC,EAAAC,GACA5C,EAAA6C,EAAAzC,EAAAuC,IACAjD,OAAAoD,eAAA1C,EAAAuC,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMA5C,EAAAkD,EAAA,SAAA7C,GACA,IAAAuC,EAAAvC,KAAA8C,WACA,WAA2B,OAAA9C,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAA0C,EAAAE,EAAA,IAAAA,GACAA,GAIA5C,EAAA6C,EAAA,SAAAO,EAAAC,GAAsD,OAAA3D,OAAAC,UAAAC,eAAAC,KAAAuD,EAAAC,IAGtDrD,EAAAyB,EAAA,IAGAzB,EAAAsD,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.b34bc11eb8863938b23c.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t7: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData === 0) {\n \t\t\treturn new Promise(function(resolve) { resolve(); });\n \t\t}\n\n \t\t// a Promise means \"currently loading\".\n \t\tif(installedChunkData) {\n \t\t\treturn installedChunkData[2];\n \t\t}\n\n \t\t// setup Promise in chunk cache\n \t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t});\n \t\tinstalledChunkData[2] = promise;\n\n \t\t// start chunk loading\n \t\tvar head = document.getElementsByTagName('head')[0];\n \t\tvar script = document.createElement('script');\n \t\tscript.type = \"text/javascript\";\n \t\tscript.charset = 'utf-8';\n \t\tscript.async = true;\n \t\tscript.timeout = 120000;\n\n \t\tif (__webpack_require__.nc) {\n \t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t}\n \t\tscript.src = __webpack_require__.p + \"static/js/\" + chunkId + \".\" + {\"0\":\"63cd763e8761847f0158\",\"1\":\"1ed08da2d0c350e97c8b\",\"2\":\"86b36fac4150598e0e03\",\"3\":\"bb2d4a70c579982e7d5e\",\"4\":\"80a38bdce915388c7433\"}[chunkId] + \".js\";\n \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n \t\tscript.onerror = script.onload = onScriptComplete;\n \t\tfunction onScriptComplete() {\n \t\t\t// avoid mem leaks in IE.\n \t\t\tscript.onerror = script.onload = null;\n \t\t\tclearTimeout(timeout);\n \t\t\tvar chunk = installedChunks[chunkId];\n \t\t\tif(chunk !== 0) {\n \t\t\t\tif(chunk) {\n \t\t\t\t\tchunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n \t\t\t\t}\n \t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t}\n \t\t};\n \t\thead.appendChild(script);\n\n \t\treturn promise;\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7a97e85123a0c2701b31"],"sourceRoot":""}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=no" />
<title>doc_phone</title> <script src="https://g.alicdn.com/dingding/dingtalk-jsapi/2.10.3/dingtalk.open.js"></script>
<title>doc</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
......
This diff is collapsed.
...@@ -10,16 +10,22 @@ ...@@ -10,16 +10,22 @@
"build": "node build/build.js" "build": "node build/build.js"
}, },
"dependencies": { "dependencies": {
"ajv": "^6.12.2",
"axios": "^0.19.2",
"less": "^3.11.1", "less": "^3.11.1",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"vant": "^2.8.2",
"vue": "^2.5.2", "vue": "^2.5.2",
"vue-router": "^3.0.1" "vue-quill-editor": "^3.0.6",
"vue-router": "^3.0.1",
"vuex": "^3.4.0"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "^7.1.2", "autoprefixer": "^7.1.2",
"babel-core": "^6.22.1", "babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1", "babel-loader": "^7.1.1",
"babel-plugin-import": "^1.13.0",
"babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0", "babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0", "babel-plugin-transform-vue-jsx": "^3.5.0",
......
<template> <template>
<div id="app"> <div id="app">
<router-view/> <router-view/>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'App' name: 'App'
} }
</script> </script>
<style> <style lang="less">
@import "./assets/font.css"; @import "./style/app.less";
@import "./style/app.less"; @import "./assets/font.css";
@import "./style/normalize.css"; @import "./style/normalize.css";
#app { @basefont: 50;
font-family: 'Avenir', Helvetica, Arial, sans-serif; #app {
-webkit-font-smoothing: antialiased; font-family: 'Avenir', Helvetica, Arial, sans-serif;
-moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased;
} -moz-osx-font-smoothing: grayscale;
font-size:24rem /@basefont;
}
</style> </style>
export default {
config:'index.php/login/index/config', //获取钉钉配置信息
getSsoToken:'index.php/login/index/getSsoToken', //通过免签码获取uid
folderList:'index.php/api/index/folderList', //访问文件夹列表
articleList:'index.php/api/index/articleList', //访问文件列表
articleDetail:'index.php/api/index/articleDetail', //获取文件详情
articleEdit:'index.php/api/index/articleEdit', //修改文件
}
\ No newline at end of file
import axios from 'axios';
import qs from 'qs';
import apiList from './apiList';
import Vue from 'vue'; //引入vue
//必须实例化 Vue
let vm = new Vue();
let baseUrl = 'http://doc-phone.linanquan.com/';
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
// 在发送请求之前做些什么
return config;
}, function (error) {
// 对请求错误做些什么
return Promise.reject(error);
});
// 添加响应拦截器
axios.interceptors.response.use(function (response) {
// 对响应数据做点什么
if(response.data.err_code !== 0){
vm.$notify({ type:'danger',duration: 2000,message:response.data.err_msg});
}
return response.data;
}, function (error) {
// 对响应错误做点什么
return Promise.reject(error);
});
export default {
post(apiName,data){
let url = apiList[apiName];
return axios({
method:'post',
baseURL:baseUrl,
url:url,
data:qs.stringify(data),
})
},
}
\ No newline at end of file
import api from './index';
export default {
//获取钉钉配置信息
config(data){
return api.post('config',data);
},
//通过免签码获取uid
getSsoToken(data){
return api.post('getSsoToken',data);
},
//访问文件夹列表
folderList(data){
return api.post('folderList',data);
},
//访问文件列表
articleList(data){
return api.post('articleList',data);
},
//获取文件详情
articleDetail(data){
return api.post('articleDetail',data);
},
//修改文件
articleEdit(data){
return api.post('articleEdit',data);
},
}
\ No newline at end of file
This diff is collapsed.
import api from '../../api/methods';
export default {
//获取钉钉配置信息
config(callback){
api.config().then((data)=>{
if(data.err_code == 0){
console.log('config::',data)
callback(data.data);
}
})
},
//通过免签码获取uid
getSsoToken(code){
api.getSsoToken({code:code }).then((data)=>{
if(data.err_code == 0){
alert(JSON.stringify(data))
console.log('config::',data)
}
})
},
//获取微应用免登授权码
getCode(){
this.config((data)=>{
console.log(data,'????')
alert(111)
dd.ready(function() {
alert(111)
dd.runtime.permission.requestAuthCode({
corpId: data.corpId, // 企业id
onSuccess: function (info) {
alert(111)
// code = info.code // 通过该免登授权码可以获取用户身份
this.getSsoToken(info.code);
},
onFail: function (info) {
alert(JSON.stringify(info))
// code = info.code // 通过该免登授权码可以获取用户身份
this.getSsoToken(info.code);
},
});
});
})
},
}
\ No newline at end of file
<template>
<div class="add_file" v-show="show_addFile">
<div class="main">
<div class="folder" :class="{folder2:!closeAni}">
<van-button round type="info" size="small" block>新建文件夹</van-button>
</div>
<div class="divider" :class="{divider2:!closeAni}">
<van-divider :style="{borderColor:'#cccccc',margin:'30px 0'}"/>
</div>
<div class="file" :class="{file2:!closeAni}">
<van-button plain round type="info" size="small" block style="margin-bottom:20px">新建富文本</van-button>
<van-button plain round type="info" size="small" block>新建Markdown</van-button>
</div>
</div>
<div class="footer">
<i class="icon-19" :class="{icon19:!closeAni}" @click="closeAdd"></i>
</div>
</div>
</template>
<script>
export default {
name: "add_file",
props:['show_addFile'],
data(){
return{
closeAni:true, //关闭页面
}
},
methods:{
closeAdd(){
this.closeAni = false;
setTimeout(()=>{
this.$emit('update:show_addFile',false);
this.closeAni = true;
},300)
}
},
}
</script>
<style scoped lang="less">
@basefont:50;
.add_file{
width:100%;
height:100vh;
position:fixed;
top:0;
z-index:9;
background-color:#f8f8f8;
.main{
padding:50% 100rem /@basefont;
>div{
height:50rem /@basefont;
}
}
.footer{
width:100%;
height:100rem /@basefont;
display:flex;
align-items:center;
justify-content:space-around;
position:absolute;
bottom:0;
background-color:#f8f8f8;
}
}
.icon-19{
font-size:60rem /@basefont;
color: #cccccc;
transform: rotate(45deg);
animation:rotate .3s;
}
.icon19{
transition:all .3s;
transform: rotate(0deg);
}
@keyframes rotate {
0%{transform: rotate(0)}
100%{transform: rotate(45deg)}
}
.folder{
animation:main .3s;
}
.divider{
animation:main .5s;
}
.file{
animation:main .7s;
}
.folder2{
animation:main2 .6s;transform: translateY(2000%)
}
.divider2{
animation:main2 .4s;transform: translateY(2000%)
}
.file2{
animation:main2 .2s;transform: translateY(2000%)
}
@keyframes main {
0%{transform: translateY(600%)}
50%{transform: translateY(-50%)}
100%{transform: translateY(0)}
}
@keyframes main2 {
0%{transform: translateY(0)}
100%{transform: translateY(2000%)}
}
</style>
\ No newline at end of file
<template>
<div class="folder">
<div class="input">
<van-search v-model="value" placeholder="请输入搜索关键词" />
</div>
<div class="main">
<!-- 文件夹列表 -->
<div v-for="(item,i) in list" class="each_folder van-hairline--bottom" @click="clickFolder(item)">
<div>
<span class="icon-107 icon107"></span>
<span class="folder_name">{{item.name}}</span>
</div>
<div class="updatetime">{{item.updatetime.substr(0,10)}}</div>
</div>
<!-- 文章列表 -->
<div v-for="(item,i) in article_list" class="each_folder van-hairline--bottom" @click="clickArticle(item)">
<div style="display:flex;justify-content:space-between;">
<span class="folder_name" style="margin:0;">{{item.title}}</span>
<span style="font-size:12px;color:#3396fb;">{{item.type==1?'富文本':'Markdown'}}</span>
</div>
<div class="updatetime">{{item.updatetime.substr(0,10)}}</div>
</div>
<van-loading v-show="show_loading" size="26" vertical color="#3396fb"/>
</div>
</div>
</template>
<script>
import api from '../api/methods';
export default {
name: "folder_component",
props:['path'],
data(){
return{
value:'',
list:[], //文件夹列表
article_list:[], //文件列表
parentid:'', //父级id
show_loading:false,
page:1,
}
},
created(){
let id = this.$route.query.folderid?this.$route.query.folderid:'';
this.folderList(id);
if(id) this.articleList(id);
},
methods:{
//获取文件夹列表
folderList(id=''){
this.show_loading = true;
api.folderList({parentid:id}).then((data)=>{
if(data.err_code == 0){
this.list = data.data;
}
this.show_loading = false;
})
},
//获取文件列表
articleList(id=''){
this.show_loading = true;
let params = {
folderid:id, //所属文件夹
pagenum:20,
current:this.page,
};
api.articleList(params).then((data)=>{
if(data.err_code == 0){
console.log(data,99)
this.article_list = data.data;
}
this.show_loading = false;
})
},
//点击文件夹
clickFolder(item){
this.$router.push({path:this.path,query:{folderid:item.folderid}});
},
//点击文章
clickArticle(item){
if(item.type == 1) this.$router.push({path:'wangeditor',query:{docid:item.docid}}); //富文本
// else this.$router.push({path:'wangeditor',query:{docid:item.docid}}); //Markdown
}
}
}
</script>
<style scoped lang="less">
@basefont:50;
.folder{
height:100%;
padding:0 30rem /@basefont;
.input{
height:100rem /@basefont;
.van-search{
padding:10px 0;
}
}
.main{
height:calc(100% - (110rem /@basefont));
overflow:auto;
padding:10rem /@basefont 0;
.each_folder{
font-size:32rem /@basefont;
padding:25rem /@basefont 0;
.folder_name{
font-weight:bolder;
color:#333333;
margin-left:20rem /@basefont;
}
.updatetime{
font-size:24rem /@basefont;
color:#cccccc;
margin-top:20rem /@basefont;
}
}
}
}
.icon107{
color:#F0E290;
}
</style>
\ No newline at end of file
<template> <template>
<div class="tabber"> <div class="tabber">
<div> <div class="each_nav" :class="{select_nav:nav_index==0}" @click="selectNav(0,'/test')">
<span class="icon-25"></span> <i class="icon-59"></i>
<span>最新</span> <div>最新</div>
</div> </div>
<div class="each_nav" :class="{select_nav:nav_index==1}" @click="selectNav(1,'/folder')">
<i class="icon-37"></i>
<div>文件夹</div>
</div>
<div class="each_nav">
<i class="icon-100" @click="show_addFile=true"></i>
</div>
<div class="each_nav" :class="{select_nav:nav_index==2}" @click="selectNav(2,'/test')">
<i class="icon-4"></i>
<div>云笔</div>
</div>
<div class="each_nav" :class="{select_nav:nav_index==3}" @click="selectNav(3,'/wangeditor')">
<i class="icon-53"></i>
<div>我的</div>
</div>
<add-file :show_addFile.sync="show_addFile"></add-file>
</div> </div>
</template> </template>
<script> <script>
import addFile from '../components/add_file';
export default { export default {
name: "tabbar" name: "tabbar",
data(){
return{
nav_index:1,
show_addFile:false,
}
},
created(){
if(this.$route.path !== "/folder"){
this.$router.push({path:'/folder'});
}
},
methods:{
selectNav(index,path){
if(index === 3) return this.$router.replace({path:'/wangeditor'});
if(index === 1){
this.nav_index = index;
if(this.$route.path == '/folder') this.$router.replace({path:'/folder2'});
else this.$router.replace({path:path});
}
}
},
components:{
addFile,
}
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@basefont:50;
.tabber{ .tabber{
display:flex; display:flex;
justify-content:space-around; justify-content:space-around;
border-top:1px solid #cccccc;
background-color:white;
.each_nav{
padding:10rem /@basefont 0;
color: #b8c9ce;
display:flex;
flex-direction: column;
align-items:center;
justify-content:space-around;
flex:1;
}
.select_nav{
color: #404040;
}
}
i{
font-size:34rem /@basefont;
}
.icon-100{
font-size:60rem /@basefont;
color: #3396fb;
} }
</style> </style>
\ No newline at end of file
...@@ -3,7 +3,34 @@ ...@@ -3,7 +3,34 @@
import Vue from 'vue' import Vue from 'vue'
import App from './App' import App from './App'
import router from './router' import router from './router'
import { Button,Search,Divider,Loading,Field,Notify } from 'vant';
import VueQuillEditor from 'vue-quill-editor';
// require styles
import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css';
Vue.use(VueQuillEditor, /* { default global options } */{
placeholder:'请输入内容',
modules: {
toolbar: [
[{'color': []}],
['bold', 'italic', 'underline', 'strike'],
[{'header': 1}, {'header': 2}],
[{'header': [1, 2, 3, 4, 5, 6, false]}
],
],
},
// readOnly: false,
// theme: 'bubble'
});
Vue.use(Search);
Vue.use(Button);
Vue.use(Divider);
Vue.use(Loading);
Vue.use(Field);
Vue.use(Notify);
Vue.config.productionTip = false Vue.config.productionTip = false
/* eslint-disable no-new */ /* eslint-disable no-new */
......
<template>
<folder-component :path="'/folder2'"></folder-component>
</template>
<script>
import folderComponent from '../components/folder_component';
export default {
name: "folder",
components:{
folderComponent
}
}
</script>
\ No newline at end of file
<template>
<folder-component :path="'/folder'"></folder-component>
</template>
<script>
import folderComponent from '../components/folder_component';
export default {
name: "folder2",
components:{
folderComponent
}
}
</script>
\ No newline at end of file
<template> <template>
<div class="index"> <div class="index">
<div class="main"> <div class="main">
我是主体 <router-view/>
</div> </div>
<tabbar class="nav"></tabbar> <tabbar class="nav"></tabbar>
</div> </div>
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
<style scoped lang="less"> <style scoped lang="less">
@basefont:50; @basefont:50;
.index{ .index{
height:100%;
.main{
height:calc(100% - (100rem /@basefont));
}
.nav{ .nav{
width:100%; width:100%;
height:100rem /@basefont; height:100rem /@basefont;
......
<template>
</template>
<script>
export default {
name: "test"
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div class="editor">
<!--<div class="doc_name">{{doc_name}}</div>-->
<van-field v-model="title" input-align="center" class="doc_name"/>
<!-- bidirectional data binding(双向数据绑定) -->
<quill-editor v-model="content" class="quill_editor"
ref="myQuillEditor"
:options="editorOption"
@blur="onEditorBlur($event)"
@focus="onEditorFocus($event)"
@ready="onEditorReady($event)"
@change="onEditorChange($event)">
</quill-editor>
<div class="bottom">
<van-button plain type="info" color="#cccccc" @click="cancel">取消</van-button>
<van-button type="info" @click="sure">确定</van-button>
</div>
</div>
</template>
<script>
import api from '../api/methods';
export default {
name: "wangeditor",
data(){
return{
content:'', //内容
title:'', //文章名字
editorOption:null,
docid:'', //文章id
}
},
created(){
this.docid = this.$route.query.docid;
this.articleDetail(this.docid);
},
methods:{
//获取文件详情
articleDetail(docid){
api.articleDetail({docid:docid}).then((data)=>{
console.log(data,999)
if(data.err_code == 0){
this.content = data.data.doc;
this.title = data.data.title;
}
})
},
//确定
sure(){
this.articleEdit();
},
//取消
cancel(){
this.$router.back();
},
//修改文件
articleEdit(){
let params = {
docid:this.docid,
title:this.title,
doc:this.content,
folderid:'',
};
api.articleEdit(params).then((data)=>{
if(data.err_code == 0){
this.$notify({ type: 'success',duration: 1500, message: '保存成功' });
this.$router.back();
}
})
},
onEditorBlur(){}, // 失去焦点事件
onEditorFocus(){}, // 获得焦点事件
onEditorReady(){}, // 准备编辑器
onEditorChange(){}, // 内容改变事件
}
}
</script>
<style scoped lang="less">
@basefont:50;
.editor{
height:100vh;
.doc_name{
height:80rem /@basefont;
color:#333333;
font-size:36rem /@basefont;
}
.quill_editor{
height:calc(100% - (200rem /@basefont));
display:flex;
flex-direction:column;
/deep/.ql-container{
flex:1;
overflow:auto;
}
/deep/.ql-container.ql-snow{
border:0;
}
/deep/.ql-toolbar.ql-snow .ql-formats{
margin-right:20rem /@basefont;
}
}
.bottom{
height:120rem /@basefont;
width:100%;
position:fixed;
bottom:0;
background-color:white;
display:flex;
z-index:11;
align-items:center;
justify-content:space-around;
padding:20rem /@basefont 0;
box-sizing:border-box;
box-shadow:0 -2px 5px #eeeeee;
.van-button{
width:40%;
}
}
}
</style>
\ No newline at end of file
import Vue from 'vue' import Vue from 'vue';
import Router from 'vue-router' import Router from 'vue-router';
import ddLogin from '../assets/js/ddLogin';
Vue.use(Router) import store from '../vuex/index';
export default new Router({ Vue.use(Router);
routes: [
{ let router = new Router({
path: '/', routes: [
name: 'index', {
component: ()=>import('@/pages/index.vue') path: '/',
} name: 'index',
] component: ()=>import('@/pages/index.vue'),
}) children:[
{
path: 'folder',
name:'folder',
component: ()=>import('@/pages/folder.vue'),
},
{
path: 'folder2',
name:'folder2',
component: ()=>import('@/pages/folder2.vue'),
},
{
path: 'wangeditor',
name:'wangeditor',
component: ()=>import('@/pages/wangeditor.vue'),
},
{
path: 'test',
name:'test',
component: ()=>import('@/pages/test.vue'),
},
]
},
]
});
router.beforeEach((to, from, next) => {
//没有用户信息说明则获取
// if(!store.state.user_info){
// ddLogin.getCode();
// }
next();
});
export default router;
\ No newline at end of file
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
const store = new Vuex.Store({
state: {
user_info:null, //用户信息
},
mutations: {
userInfo(state,data){
state.user_info = data;
},
}
});
export default store;
\ No newline at end of file
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