Commit 80b91a2f by chenxianqi

add flutter_kefu ui

parent f8f7c88e
Showing with 699 additions and 165 deletions
......@@ -47,4 +47,4 @@
}
input:-ms-input-placeholder{ /* Internet Explorer 10-11 */
color:#ccc;
}</style><link href=css/chunk-027be9b0.1440a418.css rel=prefetch><link href=css/chunk-08473d3a.77daa9fe.css rel=prefetch><link href=css/chunk-08627161.c1f4f120.css rel=prefetch><link href=css/chunk-132fc719.b547401f.css rel=prefetch><link href=css/chunk-1e573615.be89fdde.css rel=prefetch><link href=css/chunk-4d213a0b.e2ea152d.css rel=prefetch><link href=css/chunk-56896308.67b3f13c.css rel=prefetch><link href=css/chunk-5d055fa8.421f5736.css rel=prefetch><link href=css/chunk-650419d0.3897bea9.css rel=prefetch><link href=css/chunk-724a4e2a.507bad62.css rel=prefetch><link href=css/chunk-763d35df.70fac712.css rel=prefetch><link href=js/chunk-027be9b0.8581622c.js rel=prefetch><link href=js/chunk-08473d3a.cbd364ac.js rel=prefetch><link href=js/chunk-08627161.5f650355.js rel=prefetch><link href=js/chunk-132fc719.a41480f1.js rel=prefetch><link href=js/chunk-1e573615.0cb8b6aa.js rel=prefetch><link href=js/chunk-343c8d41.1c228cb2.js rel=prefetch><link href=js/chunk-4d213a0b.3bbca8ee.js rel=prefetch><link href=js/chunk-56896308.d6c7d80b.js rel=prefetch><link href=js/chunk-5d055fa8.fbfb58a4.js rel=prefetch><link href=js/chunk-650419d0.394afa0b.js rel=prefetch><link href=js/chunk-724a4e2a.fc934ad3.js rel=prefetch><link href=js/chunk-763d35df.ce4d187a.js rel=prefetch><link href=css/app.ba710877.css rel=preload as=style><link href=css/chunk-vendors.cb739fea.css rel=preload as=style><link href=js/app.cce3c34a.js rel=preload as=script><link href=js/chunk-vendors.420bd1eb.js rel=preload as=script><link href=css/chunk-vendors.cb739fea.css rel=stylesheet><link href=css/app.ba710877.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.420bd1eb.js></script><script src=js/app.cce3c34a.js></script></body></html>
\ No newline at end of file
}</style><link href=css/chunk-027be9b0.1440a418.css rel=prefetch><link href=css/chunk-08473d3a.77daa9fe.css rel=prefetch><link href=css/chunk-08627161.c1f4f120.css rel=prefetch><link href=css/chunk-132fc719.b547401f.css rel=prefetch><link href=css/chunk-1e573615.be89fdde.css rel=prefetch><link href=css/chunk-4d213a0b.e2ea152d.css rel=prefetch><link href=css/chunk-56896308.67b3f13c.css rel=prefetch><link href=css/chunk-650419d0.3897bea9.css rel=prefetch><link href=css/chunk-724a4e2a.507bad62.css rel=prefetch><link href=css/chunk-763d35df.70fac712.css rel=prefetch><link href=css/chunk-93f1e5fa.00a95a4b.css rel=prefetch><link href=js/chunk-027be9b0.1078ee31.js rel=prefetch><link href=js/chunk-08473d3a.57550f5a.js rel=prefetch><link href=js/chunk-08627161.af4b0a2d.js rel=prefetch><link href=js/chunk-132fc719.078733a8.js rel=prefetch><link href=js/chunk-1e573615.16b6c862.js rel=prefetch><link href=js/chunk-343c8d41.1c228cb2.js rel=prefetch><link href=js/chunk-4d213a0b.21e8499f.js rel=prefetch><link href=js/chunk-56896308.2e82959c.js rel=prefetch><link href=js/chunk-650419d0.99e278a2.js rel=prefetch><link href=js/chunk-724a4e2a.f58c8db3.js rel=prefetch><link href=js/chunk-763d35df.f33fe524.js rel=prefetch><link href=js/chunk-93f1e5fa.a95dbb52.js rel=prefetch><link href=css/app.ba710877.css rel=preload as=style><link href=css/chunk-vendors.cb739fea.css rel=preload as=style><link href=js/app.6d40cefd.js rel=preload as=script><link href=js/chunk-vendors.420bd1eb.js rel=preload as=script><link href=css/chunk-vendors.cb739fea.css rel=stylesheet><link href=css/app.ba710877.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.420bd1eb.js></script><script src=js/app.6d40cefd.js></script></body></html>
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4d213a0b"],{"4f37":function(t,e,s){"use strict";s("aa77")("trim",(function(t){return function(){return t(this,3)}}))},a84c:function(t,e,s){"use strict";var n=s("ed2b"),a=s.n(n);a.a},aa77:function(t,e,s){var n=s("5ca1"),a=s("be13"),o=s("79e5"),i=s("fdef"),r="["+i+"]",c="​…",l=RegExp("^"+r+r+"*"),u=RegExp(r+r+"*$"),m=function(t,e,s){var a={},r=o((function(){return!!i[t]()||c[t]()!=c})),l=a[t]=r?e(p):i[t];s&&(a[s]=l),n(n.P+n.F*r,"String",a)},p=m.trim=function(t,e){return t=String(a(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(u,"")),t};t.exports=m},bd01:function(t,e,s){"use strict";s.r(e);var n=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"login"},[s("div",{staticClass:"form"},[s("div",{staticClass:"left"},[s("div",{staticClass:"tit"},[t._v("欢迎回来, 请登录!")]),s("span",[t._v("客服系统-工作台")]),s("div",{staticClass:"client"},[s("p",[t._v("客户端下载")]),s("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-download"},on:{click:t.dmac}},[t._v("Mac 版下载")]),s("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-download"},on:{click:t.dwin}},[t._v("Windows 版下载")])],1)]),s("div",{staticClass:"right"},[s("el-form",{ref:"form",attrs:{model:t.form,onsubmit:"return false","label-width":"80px"}},[s("span",{staticClass:"lable"},[t._v("用户登录")]),s("el-input",{staticClass:"input",attrs:{placeholder:"请输入用户名","prefix-icon":"el-icon-user"},model:{value:t.form.username,callback:function(e){t.$set(t.form,"username",e)},expression:"form.username"}}),s("el-input",{staticClass:"input",attrs:{type:"password",placeholder:"请输入密码","prefix-icon":"el-icon-unlock","show-password":""},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}}),s("el-row",{staticClass:"btn-group",attrs:{type:"flex"}},[s("el-button",{attrs:{"native-type":"submit",size:"small",type:"primary"},on:{click:t.login}},[t._v("登录")]),s("el-button",{attrs:{size:"small",type:"info"}},[t._v("重置")])],1)],1)],1)])])},a=[],o=(s("4f37"),s("bc3a")),i=s.n(o),r={name:"login",data:function(){return{form:{auth_type:1,username:"",password:""}}},mounted:function(){document.title="用户登录"},methods:{login:function(){var t=this;""!=this.form.username.trim()?""!=this.form.password.trim()?i.a.post("/auth/login",this.form).then((function(e){t.$store.commit("onChangeAdminInfo",e.data.data),t.$store.commit("onIsLogin",!0),localStorage.setItem("Authorization",e.data.data.token),t.$message({message:"登录成功!",type:"success"}),t.$router.push({path:"/index"})})).catch((function(e){console.log(e),t.$message.error(e.response.data.message)})):this.$message.error("密码不能为空!"):this.$message.error("用户名不能为空!")},dmac:function(){window.open("http://kf.aissz.com:666/static/app/mac-0.0.1.dmg")},dwin:function(){window.open("http://kf.aissz.com:666/static/app/win-0.0.1.exe")}}},c=r,l=(s("a84c"),s("2877")),u=Object(l["a"])(c,n,a,!1,null,"11ae6484",null);e["default"]=u.exports},ed2b:function(t,e,s){},fdef:function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"}}]);
//# sourceMappingURL=chunk-4d213a0b.3bbca8ee.js.map
\ No newline at end of file
//# sourceMappingURL=chunk-4d213a0b.21e8499f.js.map
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
.content[data-v-7cace18b]{padding:50px 10px}.content .field-line[data-v-7cace18b]{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;box-sizing:border-box;height:45px;border-bottom:1px solid #ddd;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center;font-size:14px;color:#333}.content .field-line span[data-v-7cace18b]:first-child{width:35px}.content .field-line input[data-v-7cace18b]{-ms-flex-positive:1;flex-grow:1;padding-left:10px;height:100%;background:none;border:0;color:#333;font-size:14px;border-radius:0}.content .field-line.algin-left[data-v-7cace18b]{-ms-flex-line-pack:left;align-content:left;-ms-flex-align:left;align-items:left}.content .field-line.arrow-right[data-v-7cace18b]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAFDUlEQVR4Xu2dMU8UQRTH32wBvR/AxmhjJZVS3R4tsdCY2NoabY100IDGUo2x0s7EaGFDtzubkPAdaCz8AFjRkRuzATwCd3sz+24nb+b9aXkw8/7/3755M7MchvClWgGjOnskTwBAOQQAAAAoV0B5+qgAAEC5AsrTRwUAAMoVUJ4+KgAAUK6A8vRRAQCAcgWUp48KAACUK6A8fVQAACBbgaZpPhPRfefcbefccVEUvyeTyZvxeLwve+ZpzE5sBTg4OLhzenp6NE/GyWSys7GxsZ2GzHJnKRYAa60lolGXdICAD5ZIAKy1T4nom096gMBHpfkxIgGo6/qjMea5b2qAwFep63FSAfhpjHkUkhYgCFFrGisSAGvtCyJ6H5oSIAhVjGS+FFpV1VpRFIdEtBqaEiAIU0xkBWhTaJpm1zm3FZbOWTQg8FdNLABtCtba70T0xD+daSQg8FNNNABcCIhouyzLHT8pdEaJB4ALASpBN9hJAAAIhqtOyQAACIaBICkAuBCgJ0jkJHAR69gdLFLI//vJVYCL1DgQoBIIPwr25ZcDAXYHZyonWwFQCXwfk0y2gV1poBL0hyH5CrCMSqB5OcgGAO4WUSsEWQHAhUDj7iA7ALgQaKsEWQIACPybwmwBAAR+EGQNABcCDT1B9gBwIci9J1ABACCYvxyoAQAQzIZAFQCAIJP3Afz62/lRuDvI5DqYAwIHgpx2B+qWgMvQcCDIZXegGgD0BBm8EMJZBnCVDAD+88NZDlLuCdQvAdp7AgBwZQ3hVIIUG0MAMKOJ0AQBAJjTRWqBAAB0bCM0QAAAFuwjORCksDsAAB4HCRwIpDeGAMADAO6JYfuZh6PR6JPnUFHDAECA3IxKcHRycvJgc3Pzb8BwUUIBQKDMfSGQuhQAgEAA+i4HAKCH0FJ/pGcVEPmJZagAgZT1NL8d5VlZll8Dhxs8HAAESNzXfGPMn5WVlXvr6+vHAcNFCQUAnjL3Nf/8178sy/KD51BRwwCAh9wc86U2fxdpA4ABj4Klm9+mDgBwGeRRAxWGcMp+CpdAWAIGevJTMh9LwAwItDz5qABLNj+Fhm9W0UMTeK4K58lP1XwsAcrNBwDM/0uUWsOHJeCKAlrL/mUZ1PYAMP8MA5UAwPxpDVAHAMf8HNb8q32AKgBg/vU2UA0AMH/22bcKADjmp3zI43OHlz0AML8bg6wBgPmLa0C2AMD8xeZnew7AMT/HrV4XCtlVAI75uTd82d8FwHy/sp/lXQDMDzc/mx4A5vczPwsAYH5/85MHAObzzE8aAJjPNz9ZAGD+csxPEgCYvzzzkwMA5i/X/KQAgPnLNz8ZAGD+MOYnAQDMH8588QDA/GHNFw1A0zS7zrmtPhJovNXro5NYAKqqWiuK4pCIVkMTg/lhiol8H8Ba+5qI9sJSIYL5oYoJ/cugpml+OecehqQD80PUmsaKrAB1Xb81xrzyTQnm+yp1PU4qAI+NMT980oL5PirNjxEJQDtda60lolFXejCfZ77YXUA7sbqu2x7gizHmxqw0YT7ffNEAtJOrqupWURTvjDF3nXM3jTHHzrnfzrm98Xi8vxwJdP8WsUuAblviZQ8A4mktciQAINKWeJMCAPG0FjkSABBpS7xJAYB4WoscCQCItCXepABAPK1FjgQARNoSb1IAIJ7WIkcCACJtiTcpABBPa5EjAQCRtsSbFACIp7XIkQCASFviTQoAxNNa5Ej/AAxh3J+K76XOAAAAAElFTkSuQmCC) 100% no-repeat;background-size:18px;padding-right:25px}.content .field-line.file[data-v-7cace18b]{position:relative;overflow:hidden;margin-top:20px;border-top:1px solid #ddd}.content .field-line.file .ed[data-v-7cace18b]{color:#8bc34a}.content .field-line.file input[data-v-7cace18b]{font-size:100px;opacity:0;position:absolute;top:0;right:0}.content .field-line.textarea[data-v-7cace18b]{-ms-flex-align:start;align-items:start;-ms-flex-line-pack:start;align-content:start;border-bottom:0;padding-top:10px;height:100px}.content .field-line.textarea textarea[data-v-7cace18b]{-ms-flex-positive:1;flex-grow:1;border:0;height:100%;resize:none;color:#333;font-size:14px;padding:3px 10px;background-color:rgba(0,0,0,.03);border-radius:3px}.content .tip[data-v-7cace18b]{font-size:11px;color:#ff9800}.content.hide-header[data-v-7cace18b]{padding-top:0}.content .sub-btn[data-v-7cace18b]{display:block;width:100%;height:45px;color:#fff;margin-top:30px;line-height:45px;text-align:center;border-radius:3px;border:none;font-size:14px;background:linear-gradient(90deg,#26a2ff,#736cde);-ms-flex-negative:0;flex-shrink:0}.content .sub-btn[data-v-7cace18b]:active{opacity:.8}.types-sheet[data-v-7cace18b]{width:100vw;height:100vh;position:fixed;top:0;left:0;right:0;bottom:0;margin:auto;background-color:rgba(0,0,0,.5)}.types-sheet .picker-box[data-v-7cace18b]{height:250px;width:100vw;position:absolute;bottom:0;left:0;right:0;margin:0 auto;background-color:#fff}.types-sheet .title[data-v-7cace18b]{height:35px;border-bottom:1px solid #f3f3f3;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:0 10px;box-sizing:border-box;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center}.types-sheet .title span[data-v-7cace18b]{font-size:14px;color:#333}.types-sheet .title .sub-btn[data-v-7cace18b]{display:block;width:55px;height:30px;color:#26a2ff;line-height:30px;text-align:right;font-size:14px;font-weight:900}.types-sheet .title .sub-btn[data-v-7cace18b]:active{opacity:.8}.tips[data-v-7cace18b]{font-size:12px;color:red;padding:10px 0}
\ No newline at end of file
.content[data-v-51923d50]{padding:50px 10px}.content .field-line[data-v-51923d50]{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;box-sizing:border-box;height:45px;border-bottom:1px solid #ddd;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center;font-size:14px;color:#333}.content .field-line span[data-v-51923d50]:first-child{width:35px}.content .field-line input[data-v-51923d50]{-ms-flex-positive:1;flex-grow:1;padding-left:10px;height:100%;background:none;border:0;color:#333;font-size:14px;border-radius:0}.content .field-line.algin-left[data-v-51923d50]{-ms-flex-line-pack:left;align-content:left;-ms-flex-align:left;align-items:left}.content .field-line.arrow-right[data-v-51923d50]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAFDUlEQVR4Xu2dMU8UQRTH32wBvR/AxmhjJZVS3R4tsdCY2NoabY100IDGUo2x0s7EaGFDtzubkPAdaCz8AFjRkRuzATwCd3sz+24nb+b9aXkw8/7/3755M7MchvClWgGjOnskTwBAOQQAAAAoV0B5+qgAAEC5AsrTRwUAAMoVUJ4+KgAAUK6A8vRRAQCAcgWUp48KAACUK6A8fVQAACBbgaZpPhPRfefcbefccVEUvyeTyZvxeLwve+ZpzE5sBTg4OLhzenp6NE/GyWSys7GxsZ2GzHJnKRYAa60lolGXdICAD5ZIAKy1T4nom096gMBHpfkxIgGo6/qjMea5b2qAwFep63FSAfhpjHkUkhYgCFFrGisSAGvtCyJ6H5oSIAhVjGS+FFpV1VpRFIdEtBqaEiAIU0xkBWhTaJpm1zm3FZbOWTQg8FdNLABtCtba70T0xD+daSQg8FNNNABcCIhouyzLHT8pdEaJB4ALASpBN9hJAAAIhqtOyQAACIaBICkAuBCgJ0jkJHAR69gdLFLI//vJVYCL1DgQoBIIPwr25ZcDAXYHZyonWwFQCXwfk0y2gV1poBL0hyH5CrCMSqB5OcgGAO4WUSsEWQHAhUDj7iA7ALgQaKsEWQIACPybwmwBAAR+EGQNABcCDT1B9gBwIci9J1ABACCYvxyoAQAQzIZAFQCAIJP3Afz62/lRuDvI5DqYAwIHgpx2B+qWgMvQcCDIZXegGgD0BBm8EMJZBnCVDAD+88NZDlLuCdQvAdp7AgBwZQ3hVIIUG0MAMKOJ0AQBAJjTRWqBAAB0bCM0QAAAFuwjORCksDsAAB4HCRwIpDeGAMADAO6JYfuZh6PR6JPnUFHDAECA3IxKcHRycvJgc3Pzb8BwUUIBQKDMfSGQuhQAgEAA+i4HAKCH0FJ/pGcVEPmJZagAgZT1NL8d5VlZll8Dhxs8HAAESNzXfGPMn5WVlXvr6+vHAcNFCQUAnjL3Nf/8178sy/KD51BRwwCAh9wc86U2fxdpA4ABj4Klm9+mDgBwGeRRAxWGcMp+CpdAWAIGevJTMh9LwAwItDz5qABLNj+Fhm9W0UMTeK4K58lP1XwsAcrNBwDM/0uUWsOHJeCKAlrL/mUZ1PYAMP8MA5UAwPxpDVAHAMf8HNb8q32AKgBg/vU2UA0AMH/22bcKADjmp3zI43OHlz0AML8bg6wBgPmLa0C2AMD8xeZnew7AMT/HrV4XCtlVAI75uTd82d8FwHy/sp/lXQDMDzc/mx4A5vczPwsAYH5/85MHAObzzE8aAJjPNz9ZAGD+csxPEgCYvzzzkwMA5i/X/KQAgPnLNz8ZAGD+MOYnAQDMH8588QDA/GHNFw1A0zS7zrmtPhJovNXro5NYAKqqWiuK4pCIVkMTg/lhiol8H8Ba+5qI9sJSIYL5oYoJ/cugpml+OecehqQD80PUmsaKrAB1Xb81xrzyTQnm+yp1PU4qAI+NMT980oL5PirNjxEJQDtda60lolFXejCfZ77YXUA7sbqu2x7gizHmxqw0YT7ffNEAtJOrqupWURTvjDF3nXM3jTHHzrnfzrm98Xi8vxwJdP8WsUuAblviZQ8A4mktciQAINKWeJMCAPG0FjkSABBpS7xJAYB4WoscCQCItCXepABAPK1FjgQARNoSb1IAIJ7WIkcCACJtiTcpABBPa5EjAQCRtsSbFACIp7XIkQCASFviTQoAxNNa5Ej/AAxh3J+K76XOAAAAAElFTkSuQmCC) 100% no-repeat;background-size:18px;padding-right:25px}.content .field-line.file[data-v-51923d50]{position:relative;overflow:hidden;margin-top:20px;border-top:1px solid #ddd}.content .field-line.file .ed[data-v-51923d50]{color:#8bc34a}.content .field-line.file input[data-v-51923d50]{font-size:100px;opacity:0;position:absolute;top:0;right:0}.content .field-line.textarea[data-v-51923d50]{-ms-flex-align:start;align-items:start;-ms-flex-line-pack:start;align-content:start;border-bottom:0;padding-top:10px;height:100px}.content .field-line.textarea textarea[data-v-51923d50]{-ms-flex-positive:1;flex-grow:1;border:0;height:100%;resize:none;color:#333;font-size:14px;padding:3px 10px;background-color:rgba(0,0,0,.03);border-radius:3px}.content .tip[data-v-51923d50]{font-size:11px;color:#ff9800}.content.hide-header[data-v-51923d50]{padding-top:0}.content .sub-btn[data-v-51923d50]{display:block;width:100%;height:45px;color:#fff;margin-top:30px;line-height:45px;text-align:center;border-radius:3px;border:none;font-size:14px;background:linear-gradient(90deg,#26a2ff,#736cde);-ms-flex-negative:0;flex-shrink:0}.content .sub-btn[data-v-51923d50]:active{opacity:.8}.types-sheet[data-v-51923d50]{width:100vw;height:100vh;position:fixed;top:0;left:0;right:0;bottom:0;margin:auto;background-color:rgba(0,0,0,.5)}.types-sheet .picker-box[data-v-51923d50]{height:250px;width:100vw;position:absolute;bottom:0;left:0;right:0;margin:0 auto;background-color:#fff}.types-sheet .title[data-v-51923d50]{height:35px;border-bottom:1px solid #f3f3f3;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:0 10px;box-sizing:border-box;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center}.types-sheet .title span[data-v-51923d50]{font-size:14px;color:#333}.types-sheet .title .sub-btn[data-v-51923d50]{display:block;width:55px;height:30px;color:#26a2ff;line-height:30px;text-align:right;font-size:14px;font-weight:900}.types-sheet .title .sub-btn[data-v-51923d50]:active{opacity:.8}.tips[data-v-51923d50]{font-size:12px;color:red;padding:10px 0}
\ No newline at end of file
......@@ -43,4 +43,4 @@
top:0 !important;
min-height: inherit!important;
left:0 !important; right:0 !important; bottom:0 !important; margin: auto !important;
}</style><link href=css/chunk-1a4e3cd3.bc23f30c.css rel=prefetch><link href=css/chunk-5750b049.975722ef.css rel=prefetch><link href=css/chunk-5e6009ff.86cb9867.css rel=prefetch><link href=css/chunk-bd7efe5c.96f83ab8.css rel=prefetch><link href=js/chunk-1a4e3cd3.81b30056.js rel=prefetch><link href=js/chunk-5750b049.b7cee639.js rel=prefetch><link href=js/chunk-5e6009ff.cb477013.js rel=prefetch><link href=js/chunk-bd7efe5c.3bdd8028.js rel=prefetch><link href=css/app.19de1655.css rel=preload as=style><link href=css/chunk-vendors.5cea36ab.css rel=preload as=style><link href=js/app.8764abed.js rel=preload as=script><link href=js/chunk-vendors.7ce94627.js rel=preload as=script><link href=css/chunk-vendors.5cea36ab.css rel=stylesheet><link href=css/app.19de1655.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.7ce94627.js></script><script src=js/app.8764abed.js></script></body></html>
\ No newline at end of file
}</style><link href=css/chunk-11c35424.f67c0e89.css rel=prefetch><link href=css/chunk-5750b049.975722ef.css rel=prefetch><link href=css/chunk-5e6009ff.86cb9867.css rel=prefetch><link href=css/chunk-bd7efe5c.96f83ab8.css rel=prefetch><link href=js/chunk-11c35424.75674ec0.js rel=prefetch><link href=js/chunk-5750b049.b7cee639.js rel=prefetch><link href=js/chunk-5e6009ff.6619c1ef.js rel=prefetch><link href=js/chunk-bd7efe5c.3bdd8028.js rel=prefetch><link href=css/app.19de1655.css rel=preload as=style><link href=css/chunk-vendors.5cea36ab.css rel=preload as=style><link href=js/app.23ac3c87.js rel=preload as=script><link href=js/chunk-vendors.7ce94627.js rel=preload as=script><link href=css/chunk-vendors.5cea36ab.css rel=stylesheet><link href=css/app.19de1655.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.7ce94627.js></script><script src=js/app.23ac3c87.js></script></body></html>
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-11c35424"],{"33a5":function(e,t,s){"use strict";var i=s("a2b5"),r=s.n(i);r.a},a2b5:function(e,t,s){},ede1:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"container"},[e.isShowHeader?s("mt-header",{attrs:{fixed:"",title:"创建工单"}},[s("div",{attrs:{slot:"left"},slot:"left"},[s("mt-button",{attrs:{icon:"back"},on:{click:function(t){return e.$router.go(-1)}}})],1)]):e._e(),s("div",{staticClass:"content",class:{"hide-header":!e.isShowHeader}},[s("div",{staticClass:"field-line arrow-right",on:{click:function(t){e.isShowTypesPicker=!0}}},[s("span",[e._v("类型:")]),s("span",[e._v(e._s(e.selectTyped||"选择工单分类"))])]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("标题:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.title,expression:"request.title"}],attrs:{type:"text",placeholder:"请输入工单标题~"},domProps:{value:e.request.title},on:{input:function(t){t.target.composing||e.$set(e.request,"title",t.target.value)}}})]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("手机:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.phone,expression:"request.phone"}],attrs:{type:"number",placeholder:"请输入您的手机~"},domProps:{value:e.request.phone},on:{input:function(t){t.target.composing||e.$set(e.request,"phone",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("必填,预留手机号方便客服联系到您~")]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("邮箱:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.email,expression:"request.email"}],attrs:{type:"email",placeholder:"请输入您的电子邮箱~"},domProps:{value:e.request.email},on:{input:function(t){t.target.composing||e.$set(e.request,"email",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("非必填,预留邮箱后若工单回复后会通过邮箱通知您~")]),s("div",{staticClass:"field-line textarea"},[s("span",[e._v("内容:")]),s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.request.content,expression:"request.content"}],attrs:{placeholder:"请输入您的工单内容~"},domProps:{value:e.request.content},on:{input:function(t){t.target.composing||e.$set(e.request,"content",t.target.value)}}})]),s("div",{staticClass:"field-line arrow-right file"},[s("span",[e._v("附件:")]),s("span",{class:{ed:""!=e.source}},[e._v(e._s(e.source?"已上传附件,重新上传可替换~":"上传附件"))]),s("input",{attrs:{type:"file"},on:{change:e.uploadFile}})]),s("div",{staticClass:"tips"},[e._v("温馨提示:由于客服值班时间原因,工单回复较慢,请您耐心等待~")]),s("span",{staticClass:"sub-btn",on:{click:function(t){return e.submit()}}},[e._v("提交")])]),e.isShowTypesPicker?s("div",{staticClass:"types-sheet"},[s("div",{staticClass:"picker-box"},[s("div",{staticClass:"title"},[s("span",[e._v("选择工单类型")]),s("span",{staticClass:"sub-btn",on:{click:function(t){e.isShowTypesPicker=!1}}},[e._v("确定")])]),s("mt-picker",{attrs:{slots:e.types},on:{change:e.onValuesChange}})],1)]):e._e()],1)},r=[],a=(s("8e6e"),s("ac6a"),s("456d"),s("a481"),s("bd86")),o=s("2f62"),n=s("76a0"),c=s("bc3a"),l=s.n(c);function u(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function p(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?u(Object(s),!0).forEach((function(t){Object(a["a"])(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):u(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var d={name:"workorder_create",components:{},data:function(){return{isSubmit:!1,request:{tid:0,title:"",content:"",phone:"",email:""},selectTyped:"",source:"",isShowTypesPicker:!1}},computed:p({},Object(o["b"])(["isShowHeader","workorders","userInfo","workorderTypes","configs","workorderTypes"]),{types:function(){for(var e=[],t=[{flex:1,values:[],className:"workorder-create-picker",textAlign:"center"}],s=0;s<this.workorderTypes.length;s++)e.push(this.workorderTypes[s].title);return t[0].values=e,t}}),mounted:function(){},methods:{onValuesChange:function(e,t){this.selectTyped=t[0];for(var s=0;s<this.workorderTypes.length;s++)if(t[0]==this.workorderTypes[s].title){this.request.tid=this.workorderTypes[s].id;break}console.log(e)},uploadFile:function(e){var t=e.target,s=t.files[0];this.isShowUploadLoading=!0;var i=this;this.$uploadFile({file:s,mode:this.configs.upload_mode,percent:function(){},success:function(e){var t;i.isShowUploadLoading=!1;var s=i.configs.upload_host+"/"+e,r=e.substr(e.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(r)?t="<br><img style='max-width:45%;margin-top:5px;' preview='1' src='"+s+"' />":(t="<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",t+="<a target='_blank' style='color: #2e9dfc;' href='"+s+"'>下载附件</a>"),i.source=t,Object(n["Toast"])({message:"上传成功~"})},fail:function(e){i.isShowUploadLoading=!1,e.response&&e.response.data&&Object(n["Toast"])({message:e.response.data.message})}})},submit:function(){var e=this;0!=this.request.tid?""!=this.request.title.trim()?""!=this.request.content.trim()?this.isSubmit||(this.isSubmit=!0,this.request.content+=this.source,l.a.post("/public/workorder/create",this.request).then((function(t){e.isSubmit=!1,Object(n["Toast"])({message:"工单创建成功~"}),setTimeout((function(){return e.$router.replace("/workorder/detail/"+t.data.data)}),500)})).catch((function(t){e.isSubmit=!1,Object(n["Toast"])({message:t.response.data.message}),console.log(t)}))):Object(n["Toast"])({message:"工单内容不能为空!"}):Object(n["Toast"])({message:"工单标题不能为空!"}):Object(n["Toast"])({message:"请选择工单类型!"})}}},m=d,h=(s("33a5"),s("2877")),f=Object(h["a"])(m,i,r,!1,null,"51923d50",null);t["default"]=f.exports}}]);
//# sourceMappingURL=chunk-11c35424.75674ec0.js.map
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1a4e3cd3"],{"0577":function(e,t,s){"use strict";var i=s("3669"),r=s.n(i);r.a},3669:function(e,t,s){},ede1:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"container"},[e.isShowHeader?s("mt-header",{attrs:{fixed:"",title:"创建工单"}},[s("div",{attrs:{slot:"left"},slot:"left"},[s("mt-button",{attrs:{icon:"back"},on:{click:function(t){return e.$router.go(-1)}}})],1)]):e._e(),s("div",{staticClass:"content",class:{"hide-header":!e.isShowHeader}},[s("div",{staticClass:"field-line arrow-right",on:{click:function(t){e.isShowTypesPicker=!0}}},[s("span",[e._v("类型:")]),s("span",[e._v(e._s(e.selectTyped||"选择工单分类"))])]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("标题:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.title,expression:"request.title"}],attrs:{type:"text",placeholder:"请输入工单标题~"},domProps:{value:e.request.title},on:{input:function(t){t.target.composing||e.$set(e.request,"title",t.target.value)}}})]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("手机:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.phone,expression:"request.phone"}],attrs:{type:"number",placeholder:"请输入您的手机~"},domProps:{value:e.request.phone},on:{input:function(t){t.target.composing||e.$set(e.request,"phone",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("必填,预留手机号方便客服联系到您~")]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("邮箱:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.email,expression:"request.email"}],attrs:{type:"email",placeholder:"请输入您的电子邮箱~"},domProps:{value:e.request.email},on:{input:function(t){t.target.composing||e.$set(e.request,"email",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("非必填,预留邮箱后若工单回复后会通过邮箱通知您~")]),s("div",{staticClass:"field-line textarea"},[s("span",[e._v("内容:")]),s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.request.content,expression:"request.content"}],attrs:{placeholder:"请输入您的工单内容~"},domProps:{value:e.request.content},on:{input:function(t){t.target.composing||e.$set(e.request,"content",t.target.value)}}})]),s("div",{staticClass:"field-line arrow-right file"},[s("span",[e._v("附件:")]),s("span",{class:{ed:""!=e.source}},[e._v(e._s(e.source?"已上传附件,重新上传可替换~":"上传附件"))]),s("input",{attrs:{type:"file"},on:{change:e.uploadFile}})]),s("div",{staticClass:"tips"},[e._v("温馨提示:由于工作时间原因,工单回复较慢,请您耐心等待~")]),s("span",{staticClass:"sub-btn",on:{click:function(t){return e.submit()}}},[e._v("提交")])]),e.isShowTypesPicker?s("div",{staticClass:"types-sheet"},[s("div",{staticClass:"picker-box"},[s("div",{staticClass:"title"},[s("span",[e._v("选择工单类型")]),s("span",{staticClass:"sub-btn",on:{click:function(t){e.isShowTypesPicker=!1}}},[e._v("确定")])]),s("mt-picker",{attrs:{slots:e.types},on:{change:e.onValuesChange}})],1)]):e._e()],1)},r=[],a=(s("8e6e"),s("ac6a"),s("456d"),s("a481"),s("bd86")),o=s("2f62"),n=s("76a0"),c=s("bc3a"),l=s.n(c);function u(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function p(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?u(Object(s),!0).forEach((function(t){Object(a["a"])(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):u(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var d={name:"workorder_create",components:{},data:function(){return{isSubmit:!1,request:{tid:0,title:"",content:"",phone:"",email:""},selectTyped:"",source:"",isShowTypesPicker:!1}},computed:p({},Object(o["b"])(["isShowHeader","workorders","userInfo","workorderTypes","configs","workorderTypes"]),{types:function(){for(var e=[],t=[{flex:1,values:[],className:"workorder-create-picker",textAlign:"center"}],s=0;s<this.workorderTypes.length;s++)e.push(this.workorderTypes[s].title);return t[0].values=e,t}}),mounted:function(){},methods:{onValuesChange:function(e,t){this.selectTyped=t[0];for(var s=0;s<this.workorderTypes.length;s++)if(t[0]==this.workorderTypes[s].title){this.request.tid=this.workorderTypes[s].id;break}console.log(e)},uploadFile:function(e){var t=e.target,s=t.files[0];this.isShowUploadLoading=!0;var i=this;this.$uploadFile({file:s,mode:this.configs.upload_mode,percent:function(){},success:function(e){var t;i.isShowUploadLoading=!1;var s=i.configs.upload_host+"/"+e,r=e.substr(e.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(r)?t="<br><img style='max-width:45%;margin-top:5px;' preview='1' src='"+s+"' />":(t="<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",t+="<a target='_blank' style='color: #2e9dfc;' href='"+s+"'>下载附件</a>"),i.source=t,Object(n["Toast"])({message:"上传成功~"})},fail:function(e){i.isShowUploadLoading=!1,e.response&&e.response.data&&Object(n["Toast"])({message:e.response.data.message})}})},submit:function(){var e=this;0!=this.request.tid?""!=this.request.title.trim()?""!=this.request.content.trim()?this.isSubmit||(this.isSubmit=!0,this.request.content+=this.source,l.a.post("/public/workorder/create",this.request).then((function(t){e.isSubmit=!1,Object(n["Toast"])({message:"工单创建成功~"}),setTimeout((function(){return e.$router.replace("/workorder/detail/"+t.data.data)}),500)})).catch((function(t){e.isSubmit=!1,Object(n["Toast"])({message:t.response.data.message}),console.log(t)}))):Object(n["Toast"])({message:"工单内容不能为空!"}):Object(n["Toast"])({message:"工单标题不能为空!"}):Object(n["Toast"])({message:"请选择工单类型!"})}}},m=d,h=(s("0577"),s("2877")),f=Object(h["a"])(m,i,r,!1,null,"7cace18b",null);t["default"]=f.exports}}]);
//# sourceMappingURL=chunk-1a4e3cd3.81b30056.js.map
\ No newline at end of file
......@@ -326,6 +326,7 @@ export default {
},
watch: {
prop() {
this.comments = []
this.getWorkOrder();
setTimeout(() => {
this.$previewRefresh();
......
......@@ -585,7 +585,7 @@ export default {
localMessage = self.$mimcInstance.createLocalMessage(
"photo",
self.account,
self.result
this.result
);
localMessage["percent"] = 0;
localMessage.isShowCancel = true;
......
......@@ -34,7 +34,7 @@
<span :class="{'ed': source != ''}">{{source ? '已上传附件,重新上传可替换~' : '上传附件'}}</span>
<input type="file" @change="uploadFile" />
</div>
<div class="tips">温馨提示:由于工作时间原因,工单回复较慢,请您耐心等待~</div>
<div class="tips">温馨提示:由于客服值班时间原因,工单回复较慢,请您耐心等待~</div>
<span class="sub-btn" @click="submit()">提交</span>
</div>
......
## [2.0.0] - 2020-04-06.
* Adapt v2 server
* Add work order function
## [1.0.1+4] - TODO: Add release date.
* TODO: Fix upload image no avatar
......
......@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:kefu_flutter/kefu_flutter.dart';
void main(){
void main() {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Color.fromRGBO(0, 0, 0, 0.0)));
......@@ -36,60 +36,53 @@ class MyHomePage extends StatefulWidget {
}
class _MyHomePageState extends State<MyHomePage> {
KeFuStore _keFu;
void _action() {
Navigator.push(context, CupertinoPageRoute(builder: (ctx){
Navigator.push(context, CupertinoPageRoute(builder: (ctx) {
return _keFu.view();
}));
}
@override
void initState() {
// 获得实例并监听数据动态 (1)
// 单列 获取对象
/// 配置信息
/// mImcTokenData 不为空,即优先使用 mImcTokenData
/// [apiHost] 客服后台API地址
/// [mImcAppID] mimc AppID
/// [mImcAppKey] mimc AppKey
/// [mImcAppSecret] mimc AppSecret
/// [mImcTokenData] mimc TokenData 服务端生成
/// [userId] 业务平台ID(扩展使用)
/// [autoLogin] 是否自动登录
/// [delayTime] 延迟登录,默认1500毫秒,以免未实例化完成就调用登录
_keFu = KeFuStore.getInstance(
debug: true,
autoLogin: true,
host: "http://kf.aissz.com:666/api",
appID: "2882303761518282099",
appKey: "5521828290099",
appSecret: "516JCA60FdP9bHQUdpXK+Q=="
);
// 获得实例并监听数据动态 (2)
_keFu.addListener(() async{
await Future.delayed(Duration(milliseconds: 200));
debugPrint("_keFu对象变动");
_keFu = KeFuStore.instance;
if(mounted) setState(() {});
});
// 获得实例并监听数据动态 (1)
// 单列 获取对象
/// 配置信息
/// mImcTokenData 不为空,即优先使用 mImcTokenData
/// [apiHost] 客服后台API地址
/// [mImcAppID] mimc AppID
/// [mImcAppKey] mimc AppKey
/// [mImcAppSecret] mimc AppSecret
/// [mImcTokenData] mimc TokenData 服务端生成
/// [userId] 业务平台ID(扩展使用)
/// [autoLogin] 是否自动登录
/// [delayTime] 延迟登录,默认300毫秒,以免未实例化完成就调用登录
_keFu = KeFuStore.init(
debug: true,
autoLogin: true,
host: "http://kf.aissz.com:666/api",
appID: "2882303761518282099",
appKey: "5521828290099",
appSecret: "516JCA60FdP9bHQUdpXK+Q==");
// 获得实例并监听数据动态 (2)
_keFu.addListener(() async {
await Future.delayed(Duration(milliseconds: 200));
debugPrint("_keFu对象变动");
_keFu = KeFuStore.getInstance;
if (mounted) setState(() {});
});
super.initState();
}
@override
void dispose() {
_keFu?.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
ThemeData themeData = Theme.of(context);
......@@ -102,28 +95,27 @@ class _MyHomePageState extends State<MyHomePage> {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RichText(
text: TextSpan(
style: TextStyle(
color: Colors.black
),
children: [
TextSpan(text: "用户id: ${_keFu.imUser?.id ?? 0} "),
TextSpan(text: "${_keFu.messageReadCount}", style: TextStyle(
color: Colors.deepOrange,
fontSize: 30.0,
fontWeight: FontWeight.w600
)),
TextSpan(text: "条未读消息"),
]
),
text: TextSpan(style: TextStyle(color: Colors.black), children: [
TextSpan(text: "用户id: ${_keFu.imUser?.id ?? 0} "),
TextSpan(
text: "${_keFu.messageReadCount}",
style: TextStyle(
color: Colors.deepOrange,
fontSize: 30.0,
fontWeight: FontWeight.w600)),
TextSpan(text: "条未读消息"),
]),
),
Text(
'欢迎使用在线客服',
),
RaisedButton(
color: themeData.primaryColor,
child: Text("联系客服", style: TextStyle(color: Colors.white),), onPressed: () => _action()
)
child: Text(
"联系客服",
style: TextStyle(color: Colors.white),
),
onPressed: () => _action())
],
),
),
......
......@@ -57,6 +57,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.1"
cupertino_icons:
dependency: "direct main"
description:
......@@ -71,6 +78,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.9"
file_picker:
dependency: transitive
description:
name: file_picker
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.1"
flutter:
dependency: "direct main"
description: flutter
......@@ -83,6 +97,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.4"
flutter_html:
dependency: transitive
description:
name: flutter_html
url: "https://pub.dartlang.org"
source: hosted
version: "0.11.1"
flutter_mimc:
dependency: transitive
description:
......@@ -114,6 +135,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
html:
dependency: transitive
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.0+3"
http:
dependency: transitive
description:
......@@ -148,7 +176,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.1+4"
version: "2.0.0"
matcher:
dependency: transitive
description:
......
......@@ -25,4 +25,4 @@ class ImConfigs {
data['open_workorder'] = this.openWorkorder;
return data;
}
}
\ No newline at end of file
}
class WorkOrderModel {
int id;
int uid;
int tid;
String title;
String content;
String phone;
String email;
int status;
int lastReply;
int cid;
int closeAt;
String remark;
int updateAt;
int delete;
int createAt;
WorkOrderModel(
{this.id,
this.uid,
this.tid,
this.title,
this.content,
this.phone,
this.email,
this.status,
this.lastReply,
this.cid,
this.closeAt,
this.remark,
this.updateAt,
this.delete,
this.createAt});
WorkOrderModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
uid = json['uid'];
tid = json['tid'];
title = json['title'];
content = json['content'];
phone = json['phone'];
email = json['email'];
status = json['status'];
lastReply = json['last_reply'];
cid = json['cid'];
closeAt = json['close_at'];
remark = json['remark'];
updateAt = json['update_at'];
delete = json['delete'];
createAt = json['create_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['uid'] = this.uid;
data['tid'] = this.tid;
data['title'] = this.title;
data['content'] = this.content;
data['phone'] = this.phone;
data['email'] = this.email;
data['status'] = this.status;
data['last_reply'] = this.lastReply;
data['cid'] = this.cid;
data['close_at'] = this.closeAt;
data['remark'] = this.remark;
data['update_at'] = this.updateAt;
data['delete'] = this.delete;
data['create_at'] = this.createAt;
return data;
}
}
class WorkOrderCommentModel {
int id;
int uid;
int aid;
int wid;
String content;
String uAvatar;
String uNickname;
String aAvatar;
String aNickname;
int createAt;
WorkOrderCommentModel(
{this.id,
this.uid,
this.aid,
this.wid,
this.content,
this.uAvatar,
this.uNickname,
this.aAvatar,
this.aNickname,
this.createAt});
WorkOrderCommentModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
uid = json['uid'];
aid = json['aid'];
wid = json['wid'];
content = json['content'];
uAvatar = json['u_avatar'];
uNickname = json['u_nickname'];
aAvatar = json['a_avatar'];
aNickname = json['a_nickname'];
createAt = json['create_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['uid'] = this.uid;
data['aid'] = this.aid;
data['wid'] = this.wid;
data['content'] = this.content;
data['u_avatar'] = this.uAvatar;
data['u_nickname'] = this.uNickname;
data['a_avatar'] = this.aAvatar;
data['a_nickname'] = this.aNickname;
data['create_at'] = this.createAt;
return data;
}
}
class WorkOrderTypeModel {
int id;
String title;
int createAt;
WorkOrderTypeModel({this.id, this.title, this.createAt});
WorkOrderTypeModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
createAt = json['create_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['title'] = this.title;
data['create_at'] = this.createAt;
return data;
}
}
......@@ -3,7 +3,8 @@ import 'package:flutter/material.dart';
class ImUtils {
/// 日期格式化
static String formatDate(int millisecondsSinceEpoch) {
static String formatDate(int millisecondsSinceEpoch,
{bool isformatFull = false}) {
if (millisecondsSinceEpoch.toString().length <= 10) {
millisecondsSinceEpoch =
int.parse(millisecondsSinceEpoch.toString() + '000');
......@@ -18,7 +19,7 @@ class ImUtils {
var dayC = diffValue / day ~/ 1;
String result;
DateTime date = DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch);
if (dayC >= 1) {
if (dayC >= 1 || isformatFull) {
result =
"${date.year}-${date.month < 10 ? "0" + date.month.toString() : date.month}-${date.day < 10 ? "0" + date.day.toString() : date.day} ${date.hour}:${date.minute < 10 ? "0" + date.minute.toString() : date.minute}";
} else {
......@@ -52,6 +53,7 @@ class ImUtils {
String cancelText = '取消',
String confirmText = '确定',
bool isConfirmPop = true,
bool isShowCancel = true,
VoidCallback onCancel,
VoidCallback onConfirm,
}) {
......@@ -60,6 +62,28 @@ class ImUtils {
barrierDismissible: false,
builder: (BuildContext context) {
ThemeData themeData = Theme.of(context);
List<Widget> actions = [];
if (isShowCancel) {
actions.add(CupertinoDialogAction(
child: Text(cancelText),
isDestructiveAction: true,
onPressed: () {
Navigator.pop(context);
if (onCancel != null) onCancel();
},
));
}
actions.add(CupertinoDialogAction(
child: Text(
confirmText,
style: TextStyle(color: themeData.primaryColor),
),
isDefaultAction: true,
onPressed: () {
if (isConfirmPop) Navigator.pop(context);
if (onConfirm != null) onConfirm();
},
));
return CupertinoAlertDialog(
title: title.isEmpty
? null
......@@ -70,27 +94,7 @@ class ImUtils {
themeData.textTheme.title.copyWith(fontSize: 16.0)),
),
content: content is Widget ? content : Text('$content'),
actions: <Widget>[
CupertinoDialogAction(
child: Text(cancelText),
isDestructiveAction: true,
onPressed: () {
Navigator.pop(context);
if (onCancel != null) onCancel();
},
),
CupertinoDialogAction(
child: Text(
confirmText,
style: TextStyle(color: themeData.primaryColor),
),
isDefaultAction: true,
onPressed: () {
if (isConfirmPop) Navigator.pop(context);
if (onConfirm != null) onConfirm();
},
),
],
actions: actions,
);
});
}
......
import 'package:flutter/material.dart';
import 'package:kefu_flutter/workorder/create.dart';
import '../models/im_message.dart';
import 'date_widget.dart';
import 'im_avatar.dart';
class WorkorderMessage extends StatelessWidget {
WorkorderMessage({this.message});
final ImMessage message;
@override
Widget build(BuildContext context) {
ThemeData themeData = Theme.of(context);
bool isDark = themeData.brightness == Brightness.dark;
Widget _avatar() {
return ImAvatar(
avatar: message.avatar,
);
}
// _goToCreateWprkOrder
void _goToCreateWprkOrder() {
Navigator.push(
context, MaterialPageRoute(builder: (context) => CreateWorkOrder()));
}
Widget msgWidget() {
return Container(
margin: EdgeInsets.only(bottom: 15.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
_avatar(),
Padding(
padding: EdgeInsets.only(left: 7.0, right: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 3.0),
constraints: BoxConstraints(maxWidth: 290.0),
padding: EdgeInsets.symmetric(
horizontal: 10.0, vertical: 5.0),
decoration: BoxDecoration(
color: isDark
? themeData.dividerColor
: Colors.white,
boxShadow: [
BoxShadow(
offset: Offset(0.0, 3.0),
color: Colors.black26.withAlpha(5),
blurRadius: 4.0,
),
BoxShadow(
offset: Offset(0.0, 3.0),
color: Colors.black26.withAlpha(5),
blurRadius: 4.0,
),
],
borderRadius:
BorderRadius.all(Radius.circular(3.0))),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("${message.payload}",
style: themeData.textTheme.title.copyWith(
color: themeData.textTheme.title.color,
fontSize: 15.0)),
GestureDetector(
onTap: _goToCreateWprkOrder,
child: Text(
"创建工单",
style: TextStyle(
fontSize: 15.0,
color: themeData.primaryColor),
),
)
],
))
],
),
],
),
),
],
),
);
}
return Column(
children: <Widget>[
Offstage(
offstage: !message.isShowDate,
child: DateWidget(
date: message.timestamp,
),
),
msgWidget()
],
);
}
}
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:kefu_flutter/models/work_order.dart';
import 'package:kefu_flutter/models/work_order_type.dart';
import 'package:kefu_flutter/utils/im_utils.dart';
class WorkOrder extends StatelessWidget{
@override
import '../kefu_flutter.dart';
import 'create.dart';
import 'detail.dart';
class WorkOrder extends StatefulWidget {
@override
_WorkOrderState createState() => _WorkOrderState();
}
class _WorkOrderState extends State<WorkOrder> {
KeFuStore keFuStore;
List<WorkOrderModel> workOrders = [];
List<WorkOrderTypeModel> get workOrderTypes {
try {
return keFuStore.workOrderTypes;
} catch (_) {
return [];
}
}
@override
void initState() {
super.initState();
if (mounted) {
keFuStore = KeFuStore.getInstance;
if (keFuStore.workOrderTypes.length == 0) {
keFuStore.getWorkOrderTypes();
}
_initData();
}
}
// init data
void _initData() async {
await _getWorkOrders();
}
// GET workorders
Future<void> _getWorkOrders() async {
if (keFuStore == null) {
debugPrint("keFuStore is not instance");
return;
}
Response res = await keFuStore.http.get('/public/workorders');
if (res.data['code'] == 200) {
workOrders = (res.data['data'] as List)
.map((i) => WorkOrderModel.fromJson(i))
.toList();
setState(() {});
}
}
// _goToCreateWprkOrder
void _goToCreateWprkOrder(BuildContext context) {
Navigator.push(
context, MaterialPageRoute(builder: (context) => CreateWorkOrder()))
.then((_) {
_getWorkOrders();
});
}
// _goToWprkOrderDetail
void _goToWprkOrderDetail(BuildContext context, int wid) {
Navigator.push(context,
MaterialPageRoute(builder: (context) => WorkOrderDetail(wid)))
.then((_) {
_getWorkOrders();
});
}
String _getTypeTitle(int tid) {
return workOrderTypes.where((item) => item.id == tid).first.title;
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
centerTitle: true,
title: Text("我的工单"),
actions: <Widget>[
FlatButton(
......@@ -13,13 +90,122 @@ class WorkOrder extends StatelessWidget{
"创建工单",
style: TextStyle(color: Colors.white),
),
onPressed: (){},
onPressed: () => _goToCreateWprkOrder(context),
)
],
],
),
body: CustomScrollView(
slivers: <Widget>[
workOrders.length <= 0
? SliverToBoxAdapter(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 30.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Icon(
Icons.library_books,
color: Colors.black26,
size: 50,
),
Padding(
padding: EdgeInsets.symmetric(vertical: 10.0),
child: Text(
"暂无相关数据~",
style:
TextStyle(color: Colors.grey, fontSize: 14.0),
),
),
],
),
),
)
: SliverList(
delegate: SliverChildBuilderDelegate((ctx, index) {
var workOrder = workOrders[index];
return Column(
children: <Widget>[
ListTile(
onTap: () =>
_goToWprkOrderDetail(context, workOrder.id),
title: DefaultTextStyle(
style: TextStyle(
fontSize: 14.0,
color: Colors.black87.withAlpha(180)),
child: Row(
children: <Widget>[
Icon(
Icons.library_books,
color: Colors.black26,
size: 25,
),
VerticalDivider(
width: 5.0, color: Colors.transparent),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Text(
"${workOrder.title}",
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
DefaultTextStyle(
style: TextStyle(
color: Colors.black45,
fontSize: 12.0),
child: Row(
children: <Widget>[
Text(
"${_getTypeTitle(workOrder.tid)} "),
Text(
" ${ImUtils.formatDate(workOrder.createAt, isformatFull: true)}"),
],
))
],
),
),
VerticalDivider(
color: Colors.transparent,
width: 10.0,
),
Text(
workOrder.status == 1
? "已回复"
: workOrder.status == 3
? "已结束"
: workOrder.status == 0
? "待处理"
: workOrder.status == 2
? "待回复"
: "未知状态",
style: TextStyle(
color: workOrder.status == 1
? Color(0XFF8bc34a)
: workOrder.status == 3
? Color(0XFFcccCCC)
: workOrder.status == 0
? Color(0XFFFF9800)
: workOrder.status == 2
? Color(0XFFFF9800)
: Colors.amber,
fontSize: 12.0),
)
],
)),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Divider(
height: 0.5,
),
)
],
);
}, childCount: workOrders.length))
],
),
);
}
}
\ No newline at end of file
}
......@@ -57,6 +57,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.1"
cupertino_icons:
dependency: "direct main"
description:
......@@ -71,6 +78,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.9"
file_picker:
dependency: "direct main"
description:
name: file_picker
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.1"
flutter:
dependency: "direct main"
description: flutter
......@@ -83,6 +97,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.4"
flutter_html:
dependency: "direct main"
description:
name: flutter_html
url: "https://pub.dartlang.org"
source: hosted
version: "0.11.1"
flutter_mimc:
dependency: "direct main"
description:
......@@ -114,6 +135,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
html:
dependency: transitive
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.0+3"
http:
dependency: transitive
description:
......
name: kefu_flutter
version: 1.0.1+4
version: 2.0.0
description: This is a customer service system based on Xiaomi Message Cloud. The flutter version may be the best open source customer service solution for flutter.
homepage: https://github.com/chenxianqi/kefu_flutter
......@@ -13,9 +13,11 @@ dependencies:
flutter_mimc: ^1.0.1
dio: ^3.0.8
image_picker: ^0.6.2+3
flutter_html: ^0.11.1
shared_preferences: ^0.5.6
provider: ^4.0.1
flutter_advanced_networkimage: ^0.6.2
file_picker: ^1.5.1
dev_dependencies:
flutter_test:
......
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 sign in to comment