Commit f8f7c88e by chenxianqi

update kefu_client style

parent 7fc54f5f
Showing with 2175 additions and 14 deletions
.content[data-v-3c521905]{padding:50px 10px}.content .field-line[data-v-3c521905]{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-3c521905]:first-child{width:35px}.content .field-line input[data-v-3c521905]{-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-3c521905]{-ms-flex-line-pack:left;align-content:left;-ms-flex-align:left;align-items:left}.content .field-line.arrow-right[data-v-3c521905]{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-3c521905]{position:relative;overflow:hidden;margin-top:20px;border-top:1px solid #ddd}.content .field-line.file .ed[data-v-3c521905]{color:#8bc34a}.content .field-line.file input[data-v-3c521905]{font-size:100px;opacity:0;position:absolute;top:0;right:0}.content .field-line.textarea[data-v-3c521905]{-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-3c521905]{-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-3c521905]{font-size:11px;color:#ff9800}.content.hide-header[data-v-3c521905]{padding-top:0}.content .sub-btn[data-v-3c521905]{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-3c521905]:active{opacity:.8}.types-sheet[data-v-3c521905]{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-3c521905]{height:250px;width:100vw;position:absolute;bottom:0;left:0;right:0;margin:0 auto;background-color:#fff}.types-sheet .title[data-v-3c521905]{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-3c521905]{font-size:14px;color:#333}.types-sheet .title .sub-btn[data-v-3c521905]{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-3c521905]:active{opacity:.8}.types-sheet .tips[data-v-3c521905]{font-size:12px;color:red;padding:10px 0}
\ No newline at end of file
.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
......@@ -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-2f081569.7395930a.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-2f081569.a91a1f28.js rel=prefetch><link href=js/chunk-5750b049.9b99e61d.js rel=prefetch><link href=js/chunk-5e6009ff.20ab0e77.js rel=prefetch><link href=js/chunk-bd7efe5c.5b3512bd.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.4146cb6a.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.4146cb6a.js></script></body></html>
\ No newline at end of file
}</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
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5750b049"],{"269c":function(t,e,o){t.exports=o.p+"img/fujian1.083cd8b7.png"},"281f":function(t,e,o){},4033:function(t,e,o){"use strict";o.r(e);var s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container"},[t.isShowHeader?s("mt-header",{attrs:{fixed:"",title:"工单详细"}},[s("div",{attrs:{slot:"left"},slot:"left"},[s("mt-button",{attrs:{icon:"back"},on:{click:function(e){return t.$router.go(-1)}}})],1),3!=t.workorder.status?s("mt-button",{attrs:{slot:"right"},on:{click:function(e){return t.close()}},slot:"right"},[s("span",[t._v("关闭工单")])]):t._e()],1):t._e(),s("div",{staticClass:"content",class:{"hide-header":!t.isShowHeader}},[s("div",{staticClass:"head"},[s("div",{staticClass:"con"},[s("span",[t._v("标题:")]),s("span",[t._v(t._s(t.workorder.title))])]),s("div",{staticClass:"con"},[s("span",[t._v("内容:")]),s("span",{domProps:{innerHTML:t._s(t.workorder.content)}})]),s("div",{staticClass:"con"},[s("span",[t._v("电话:")]),s("span",[t._v(t._s(t.workorder.phone||"未预留电话号码"))])]),s("div",{staticClass:"con"},[s("span",[t._v("邮箱:")]),s("span",[t._v(t._s(t.workorder.email||"未预留邮箱"))])]),s("div",{staticClass:"con"},[s("span",[t._v("时间:")]),s("span",[t._v(t._s(t.$formatDate(t.workorder.create_at)))])]),s("div",{staticClass:"con"},[s("span",[t._v("类型:")]),s("span",[t._v(t._s(t.typeName||"---"))])]),s("div",{staticClass:"con"},[s("span",[t._v("状态:")]),s("span",[1==t.workorder.status?s("i",{staticStyle:{color:"#8bc34a"}},[t._v("已回复")]):t._e(),3==t.workorder.status?s("i",{staticStyle:{color:"#ccc"}},[t._v("已结束")]):t._e(),0==t.workorder.status?s("i",{staticStyle:{color:"#FF9800"}},[t._v("待处理")]):t._e(),2==t.workorder.status?s("i",{staticStyle:{color:"#FF9800"}},[t._v("待回复")]):t._e()])])]),s("div",{staticClass:"comments"},[t.comments.length<=0?s("div",{staticClass:"no-data"},[t._v("暂无回复内容,请您耐心等待~")]):t._l(t.comments,(function(e,o){return[s("div",{key:o,staticClass:"item"},[s("div",{staticClass:"avatar"},[0==e.aid?s("img",{attrs:{src:t.userInfo.avatar||"http://qiniu.cmp520.com/avatar_degault_3.png",alt:""}}):s("img",{attrs:{src:e.a_avatar||"http://qiniu.cmp520.com/avatar_degault_3.png",alt:""}})]),s("div",{staticClass:"right"},[0==e.aid?s("div",{staticClass:"nickname"},[t._v("我")]):s("div",{staticClass:"nickname"},[t._v(t._s(e.a_nickname))]),s("div",{staticClass:"detail",domProps:{innerHTML:t._s(e.content)}}),s("div",{staticClass:"date"},[t._v(t._s(t.$formatDate(e.create_at)))])])])]})),3==t.workorder.status?s("div",{staticClass:"workorder-close"},[t._v("工单已结束~")]):t._e()],2),""!=t.request.source||t.isShowUploadLoading?s("div",{staticClass:"file-view"},[t.isShowUploadLoading?s("span",[s("img",{attrs:{src:o("cf1c"),alt:""}}),s("i",[t._v("上传中~")])]):s("span",[s("img",{attrs:{src:o("269c"),alt:""}}),s("i",[t._v("你已成功添加附件,重新上传可替换~")])])]):t._e(),3!=t.workorder.status?s("div",{staticClass:"input-form"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.request.content,expression:"request.content"}],attrs:{placeholder:"请输入内容~"},domProps:{value:t.request.content},on:{blur:function(e){return t.inputBlur()},input:function(e){e.target.composing||t.$set(t.request,"content",e.target.value)}}}),s("span",{staticClass:"icon-btn"},[s("input",{attrs:{title:"添加附件",type:"file",onclick:"this.value = null"},on:{change:t.uploadFile}})]),s("span",{staticClass:"sub-btn",on:{click:function(e){return t.reply()}}},[t._v("提交")])]):t._e()])],1)},r=[],n=(o("8e6e"),o("ac6a"),o("456d"),o("bd86")),a=o("2f62"),i=o("76a0"),c=o("bc3a"),l=o.n(c);function u(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,s)}return o}function d(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?u(Object(o),!0).forEach((function(e){Object(n["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var p={name:"workorder_detail",components:{},data:function(){return{isShowUploadLoading:!1,isSubmit:!1,workorder:{},comments:[],fileType:"",request:{source:"",content:""}}},computed:d({},Object(a["b"])(["isShowHeader","workorders","userInfo","workorderTypes","configs"]),{typeName:function(){var t=this;try{return this.workorderTypes.filter((function(e){return e.id==t.workorder.tid}))[0].title}catch(e){return console.log(e),""}}}),created:function(){var t=this;document.title="工单详细";var e=this.$route.params.id;this.$store.commit("updateState",{isShowPageLoading:!0}),l.a.all([this.getWorkOrder(e),this.getComments(e)]).then(l.a.spread((function(){t.$store.commit("updateState",{isShowPageLoading:!1})})))},methods:{getWorkOrder:function(t){var e=this;return l.a.get("/public/workorder/"+t).then((function(t){e.workorder=t.data.data,setTimeout((function(){return e.$previewRefresh()}),200)})).catch((function(t){console.log(t)}))},getComments:function(t){var e=this;return l.a.get("/public/workorder/comments/"+t).then((function(t){null!=t.data.data&&(e.comments=t.data.data,setTimeout((function(){return e.$previewRefresh()}),200))})).catch((function(t){console.log(t)}))},reply:function(){var t=this,e=this.request.content+this.request.source;if(""!=e.trim()){if(!this.isSubmit){this.isSubmit=!0;var o=this.workorder.id;l.a.post("/public/workorder/reply",{wid:o,content:e}).then((function(e){t.isSubmit=!1,console.log(e),t.getComments(o),t.request={source:"",content:""},setTimeout((function(){var t=document.querySelector(".container").clientHeight,e=document.querySelector(".content").clientHeight;document.querySelector(".container").scrollTop=e-t+20}),500)})).catch((function(e){t.isSubmit=!1,console.log(e),Object(i["Toast"])({message:"提交失败~"})}))}}else Object(i["Toast"])({message:"请输入内容~"})},inputBlur:function(){setTimeout((function(){document.body.scrollTo=0,window.scrollTo(0,0)}),100)},uploadFile:function(t){var e=t.target,o=e.files[0];this.isShowUploadLoading=!0;var s=this;this.$uploadFile({file:o,secret:s.configs.upload_secret,mode:this.configs.upload_mode,percent:function(){},success:function(t){var e;s.isShowUploadLoading=!1;var o=s.configs.upload_host+"/"+t,r=t.substr(t.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(r)?e="<br><img style='max-width:45%;margin-top:5px;' preview='1' src='"+o+"' />":(e="<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",e+="<a target='_blank' style='color: #2e9dfc;' href='"+o+"'>下载附件</a>"),s.request.source=e,Object(i["Toast"])({message:"上传成功~"})},fail:function(t){s.isShowUploadLoading=!1,t.response&&t.response.data&&Object(i["Toast"])({message:t.response.data.message})}})},close:function(){var t=this,e=this.workorder.id;i["MessageBox"].confirm("您确定关闭该工单吗?").then((function(){l.a.put("/public/workorder/close/"+e).then((function(o){console.log(o),Object(i["Toast"])({message:"工单已关闭~"}),t.getWorkOrder(e)})).catch((function(t){Object(i["Toast"])({message:"工单关闭失败~"}),console.log(t)}))}))},del:function(){var t=this,e=this.workorder.id;i["MessageBox"].confirm("您确定删除该工单吗?").then((function(){l.a.delete("/public/workorder/"+e).then((function(e){console.log(e),Object(i["Toast"])({message:"工单已删除~"}),setTimeout((function(){return t.$router.go(-1)}))})).catch((function(t){Object(i["Toast"])({message:"工单关闭失败~"}),console.log(t)}))}))}}},A=p,g=(o("cb38"),o("2877")),m=Object(g["a"])(A,s,r,!1,null,"35e99ebc",null);e["default"]=m.exports},cb38:function(t,e,o){"use strict";var s=o("281f"),r=o.n(s);r.a},cf1c:function(t,e){t.exports="data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7"}}]);
//# sourceMappingURL=chunk-5750b049.9b99e61d.js.map
\ No newline at end of file
//# sourceMappingURL=chunk-5750b049.b7cee639.js.map
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bd7efe5c"],{3563:function(t,e,A){"use strict";var r=A("b9df"),o=A.n(r);o.a},"7d02":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAEMklEQVR4Xu2dbXbaMBBFFVZWnyysYWEcJRtzetzQpglftuaJ8jSXv8jD6M3Vk4SFeSq8UivwlLr3dL4AQHIIAAAAkiuQvPs4AAAkVyB593EAAEiuQPLu4wAAkFyB5N3HAQDAR4Fa67tDttM02Qwsm0SXwgOAHn8A0GtacIAOouIAfUTFATroigN0EPWKA7x2+ri1YX98bwgAa6Xb2O7CIvB1mqZpYyhJ81prLaUAgETNFUEAYIVIG5tI1gC11mUULKPhf7wezgHuIcI8z/vn5+eX6GcBQEDBS1NAIOTqSwHgUyocYDU2pw1xgIB4OMBRPNYAAYoaL3WZAtR79JMtVynlEaeA7v22AECV5J9B4rINLGW5HTBJIKi1/iylnKz2Vdp2XQOokrwFQKOLqi4750oyAA6Hw8tut1sg+PJSaTsCAKpCKuPIAMAB/imLy3kApoBj0VQ2dWMKUI5cVSwcYFESAOI8MQUwBbALiI8j3wg4gG/tJJkDgERG3yAA4Fs7SeYAIJHRNwgA+NZOkjkASGT0DQIAvrWTZA4AEhl9gwCAb+0kmQOAREbfIADgWztJ5gAgkdE3CAD41k6SOQBIZPQNkhKAS532LePvzJtOCaUE4NJJWAD4VEB12uohTwXjAJ+FTukAAAAAZ8/BMQXkmgLO/eLGmYF9y8/FUk4BzlVW5w4AakXN4gGAWcHU6QKAWlGzeABgVjB1ugCgVtQsHgCYFUydLgCoFTWLBwBmBVOnCwBqRc3iAYBZwdTppgTg2OnlCSM3b1fvdrv3a+2W988VZbnm0nvqIh7jvXEvYKWy3A5OfjuYE0GDALA84XKapv3Kgf+3GQAMAkDruTUAGAQAHOCL9+U7FdwKALuAQRygdQrYumYYuX3K7wFGLujWvgHAVsUGaw8AgxV0a3esAWhdBG4VaeT21gCwCIyjaQ0ADgAATV8Fx2UbJ4K1AzAFxEEEgLiG1hGsAWANEGfPGoBRp4DjfwZvqu48z28tf/duDcCoDtDy93WtgwEANo2z+zQGgG86X/r38Fbq71PG9k8BAAA4e9L4GlKtg8F6CmjtdPvYvM+VOAAO0PT8onS/Cxh1F3Afn/n4FOspAADiqABAXEPrCABgXb548tYAjLoLiJd1fQQAWK/VkC2tAWARGGfSGgCmgOQA4AAAwJnAIAPWUwAOEKw+3wTGBXSPYO0ALALj+F15XpJker35FK41Xch2IGSNJqo21g7AGiCOgTUATAHJAcABAECyUInL6BvBegrAAeLgWe8CAKAfAKr1VddtYCnlNS4BEUopJ4dQXQCgep0UAIBOwrqEBQCXSnXKEwA6CWsUVrLF7r0INNLTK9VHdAAvBQfItuWnZt+7LXGAAbRM2wUASFv6j44DAAAkVyB593EAAEiuQPLu4wAAkFyB5N3HAQAguQLJu48DJAfgF+1bWNtJgJDcAAAAAElFTkSuQmCC"},b9df:function(t,e,A){},fb09:function(t,e,A){"use strict";A.r(e);var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container"},[t.isShowHeader?r("mt-header",{attrs:{fixed:"",title:"我的工单"}},[r("div",{attrs:{slot:"left"},slot:"left"},[r("mt-button",{attrs:{icon:"back"},on:{click:function(e){return t.$router.go(-1)}}})],1),r("mt-button",{attrs:{slot:"right"},on:{click:function(e){return t.$router.push("/workorder/create")}},slot:"right"},[r("span",[t._v("创建工单")])])],1):t._e(),r("div",{staticClass:"list",class:{"hide-header":!t.isShowHeader}},[t.workorders.length<=0?r("div",{staticClass:"no-data"},[r("img",{attrs:{src:A("7d02"),alt:""}}),r("div",[t._v("没有相关记录~")])]):r("ul",[t._l(t.workorders,(function(e,A){return[r("li",{key:A,on:{click:function(A){return t.$router.push("/workorder/detail/"+e.id)}}},[r("div",{staticClass:"title"},[t._v(t._s(e.title))]),r("div",[r("span",{staticClass:"type"},[t._v(t._s(t.getTypeName(e.tid)))]),r("span",{staticClass:"date"},[t._v(t._s(t.$formatDate(e.create_at)))])]),1==e.status?r("i",{staticStyle:{color:"#8bc34a"}},[t._v("已回复")]):t._e(),3==e.status?r("i",{staticStyle:{color:"#ccc"}},[t._v("已结束")]):t._e(),0==e.status?r("i",{staticStyle:{color:"#FF9800"}},[t._v("待处理")]):t._e(),2==e.status?r("i",{staticStyle:{color:"#FF9800"}},[t._v("待回复")]):t._e()])]}))],2)]),t.isShowHeader?t._e():r("div",{staticClass:"floting",on:{click:function(e){return t.$router.push("/workorder/create")}}})],1)},o=[],n=(A("8e6e"),A("ac6a"),A("456d"),A("bd86")),s=A("2f62");function i(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,r)}return A}function c(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?i(Object(A),!0).forEach((function(e){Object(n["a"])(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):i(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var a={name:"workorder",components:{},data:function(){return{}},created:function(){document.title="我的工单"},computed:c({},Object(s["b"])(["isShowHeader","workorders","workorderTypes"])),mounted:function(){this.$store.dispatch("onGetWorkorderTypes"),this.$store.dispatch("onGetWorkorders")},methods:{getTypeName:function(t){try{return this.workorderTypes.filter((function(e){return e.id==t}))[0].title}catch(e){return console.log(e),""}}}},u=a,d=(A("3563"),A("2877")),l=Object(d["a"])(u,r,o,!1,null,"6ca82fb2",null);e["default"]=l.exports}}]);
//# sourceMappingURL=chunk-bd7efe5c.5b3512bd.js.map
\ No newline at end of file
//# sourceMappingURL=chunk-bd7efe5c.3bdd8028.js.map
\ No newline at end of file
......@@ -342,11 +342,11 @@ export default {
}
}
}
.tips{
font-size 12px
color red
padding 10px 0
}
}
.tips{
font-size 12px
color red
padding 10px 0
}
</style>
......@@ -2,6 +2,6 @@ module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
outputDir: '../../public/client/',
devServer: {
proxy: 'http://im.cmp520.com',
proxy: 'http://kf.aissz.com:666',
}
}
\ No newline at end of file
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_mimc","dependencies":[]},{"name":"image_picker","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"shared_preferences","dependencies":[]}]}
\ No newline at end of file
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.packages
.pub-cache/
.pub/
build/
# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
# example
example/build
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: 68587a0916366e9512a78df22c44163d041dd5f3
channel: stable
project_type: package
## [1.0.1+4] - TODO: Add release date.
* TODO: Fix upload image no avatar
## [1.0.1+3] - TODO: Add release date.
* TODO: Fix upload image problem
## [1.0.1+2] - TODO: Add release date.
* TODO: change instance function
* TODO: add example Adroid permission
## [1.0.1+1] - TODO: Add release date.
* TODO: format all file
* TODO: Update README.md
## [1.0.1] - TODO: Add release date.
* TODO: update varsion code
* TODO: update init is not complete and show tips
## [0.0.2] - TODO: Add release date.
* TODO: format all file
* TODO: Support 1.12.13 + hotfix.5
## [0.0.1] - TODO: Add release date.
* TODO: Describe initial release.
\ No newline at end of file
Copyright 2019 keith
Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
\ No newline at end of file
客服系统开发者QQ交流群: 623661658
# 欢迎使用本客服系统 - kefu_flutter
![客服系统](http://qiniu.cmp520.com/flutter_kefu.jpg)
## 本项目关联GIT项目资源连接
- **[服务端][1]**
- **[客服端-APP工作台][7]** 客服端APP工作台flutter源码
- **[客服端-网页工作台][2]**
- **[客户端H5][3]**
- **[客户端Flutter][4]**
- **[Flutter-mimc][6]**
**本系统** 是基于小米消息云实现的一款简单实用的面向多终端的客服系统,本系统简单易用,易扩展,易整合现有的业务系统,无缝对接自有业务。
## 项目的依赖其他库
如果您也是用了以下库,存在版本冲突,可以尝试修改
``` dart
flutter_mimc: ^1.0.1
dio: ^3.0.8
image_picker: ^0.6.2+3
shared_preferences: ^0.5.6
provider: ^4.0.1
flutter_advanced_networkimage: ^0.6.2
```
## Android 你应该添加的权限
```xml
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
```
## IOS 你应该添加的权限
```xml
<key>NSCameraUsageDescription</key>
<key>NSPhotoLibraryUsageDescription</key>
```
## EXAMPLE AND INSTALL
- **[下载Android体验][5]**
dependencies:
kefu_flutter: $lastVersion
import 'package:kefu_flutter/kefu_flutter.dart';
``` dart
KeFuStore _keFu;
@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/v1",
appID: "",
appKey: "",
appSecret: ""
);
/// 获得实例并监听数据动态 (2)
_keFu.addListener(() async{
await Future.delayed(Duration(milliseconds: 200));
debugPrint("_keFu对象变动");
_keFu = KeFuStore.instance;
if(mounted) setState(() {});
});
/// 或者设置不自动登录,自己手动登录
/// _keFu.loginIm()
super.initState();
}
/// 获得客服页面视图
_keFu.view();
/// 然后记得销毁
@override
void dispose() {
_keFu?.dispose();
super.dispose();
}
```
[1]: https://github.com/chenxianqi/kefu_server
[2]: https://github.com/chenxianqi/kefu_admin
[3]: https://github.com/chenxianqi/kefu_client
[4]: https://github.com/chenxianqi/kefu_flutter
[5]: http://kf.aissz.com:666/static/app/app-release.apk
[6]: https://github.com/chenxianqi/flutter_mimc
[7]: https://github.com/chenxianqi/kefu_workbench
\ No newline at end of file
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Web related
lib/generated_plugin_registrant.dart
# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: 27321ebbad34b0a3fafe99fac037102196d655ff
channel: stable
project_type: app
# kefu_flutter_example
A new Flutter application.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android</name>
<comment>Project android created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>app</name>
<comment>Project app created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.keith.www.kefu_flutter_example"
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.keith.www.kefu_flutter_example">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.keith.www.kefu_flutter_example">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name="io.flutter.app.FlutterApplication"
android:label="在线客服"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
package com.keith.www.kefu_flutter_example;
import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity {
@Override
public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.keith.www.kefu_flutter_example">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
No preview for this file type
storePassword=chenxianqi
keyPassword=chenxianqi
keyAlias=key
storeFile=/Users/chenxianqi/product/kefu_flutter/example/android/key.jks
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
</dict>
</plist>
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
generated_key_values = {}
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) do |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
generated_key_values[podname] = podpath
else
puts "Invalid plugin specification: #{line}"
end
end
generated_key_values
end
target 'Runner' do
# Flutter Pod
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
unless File.exist?(generated_xcode_build_settings_path)
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
unless File.exist?(copied_framework_path)
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
end
unless File.exist?(copied_podspec_path)
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
end
end
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
# Plugin Pods
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.each do |name, path|
symlink = File.join('.symlinks', 'plugins', name)
File.symlink(path, symlink)
pod name, :path => File.join(symlink, 'ios')
end
end
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
PODS:
- Flutter (1.0.0)
- flutter_mimc (0.0.1):
- Flutter
- image_picker (0.0.1):
- Flutter
- path_provider (0.0.1):
- Flutter
- shared_preferences (0.0.1):
- Flutter
- shared_preferences_macos (0.0.1):
- Flutter
- shared_preferences_web (0.0.1):
- Flutter
DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_mimc (from `.symlinks/plugins/flutter_mimc/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
EXTERNAL SOURCES:
Flutter:
:path: Flutter
flutter_mimc:
:path: ".symlinks/plugins/flutter_mimc/ios"
image_picker:
:path: ".symlinks/plugins/image_picker/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
shared_preferences_macos:
:path: ".symlinks/plugins/shared_preferences_macos/ios"
shared_preferences_web:
:path: ".symlinks/plugins/shared_preferences_web/ios"
SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_mimc: 55bda5d123df8355bcd86d12f2fb64bd71d2b40b
image_picker: e3eacd46b94694dde7cf2705955cece853aa1a8f
path_provider: fb74bd0465e96b594bb3b5088ee4a4e7bb1f2a9d
shared_preferences: 430726339841afefe5142b9c1f50cb6bd7793e01
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
PODFILE CHECKSUM: 3dbe063e9c90a5d7c9e4e76e70a821b9e2c1d271
COCOAPODS: 1.8.4
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : FlutterAppDelegate
@end
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>kefu_flutter_example</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char* argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
// ignore_for_file: non_constant_identifier_names
// ignore_for_file: camel_case_types
// ignore_for_file: prefer_single_quotes
// This file is automatically generated. DO NOT EDIT, all your changes would be lost.
class JSONField {
final String name;
const JSONField(this.name);
}
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:kefu_flutter/kefu_flutter.dart';
void main(){
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Color.fromRGBO(0, 0, 0, 0.0)));
SystemChrome.setPreferredOrientations(
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
return runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: '在线客服',
theme: ThemeData(
primarySwatch: Colors.blue,
brightness: Brightness.light,
primaryColor: Colors.blue,
),
home: MyHomePage(title: 'Flutter 在线客服 DEMO'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
KeFuStore _keFu;
void _action() {
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(() {});
});
super.initState();
}
@override
void dispose() {
_keFu?.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
ThemeData themeData = Theme.of(context);
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
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(
'欢迎使用在线客服',
),
RaisedButton(
color: themeData.primaryColor,
child: Text("联系客服", style: TextStyle(color: Colors.white),), onPressed: () => _action()
)
],
),
),
);
}
}
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
dio:
dependency: transitive
description:
name: dio
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.9"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_advanced_networkimage:
dependency: transitive
description:
name: flutter_advanced_networkimage
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.4"
flutter_mimc:
dependency: transitive
description:
name: flutter_mimc
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.6"
flutter_svg:
dependency: transitive
description:
name: flutter_svg
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.3+1"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
http:
dependency: transitive
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.0+4"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
image_picker:
dependency: transitive
description:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.4"
kefu_flutter:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "1.0.1+4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.6"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.8"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
path_drawing:
dependency: transitive
description:
name: path_drawing
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
path_parsing:
dependency: transitive
description:
name: path_parsing
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
path_provider:
dependency: transitive
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.5"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
provider:
dependency: transitive
description:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.4"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
shared_preferences:
dependency: transitive
description:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.6+3"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+6"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2+4"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.5"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.11"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
sdks:
dart: ">2.4.0 <3.0.0"
flutter: ">=1.12.13+hotfix.4 <2.0.0"
name: kefu_flutter_example
description: A new Flutter application.
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
kefu_flutter:
path: ../
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:kefu_flutter_example/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}
// ignore_for_file: non_constant_identifier_names
// ignore_for_file: camel_case_types
// ignore_for_file: prefer_single_quotes
// This file is automatically generated. DO NOT EDIT, all your changes would be lost.
class JSONField {
final String name;
const JSONField(this.name);
}
class ImConfigs {
int uploadMode;
String uploadSecret;
String uploadHost;
int openWorkorder;
ImConfigs(
{this.uploadMode,
this.uploadSecret,
this.uploadHost,
this.openWorkorder});
ImConfigs.fromJson(Map<String, dynamic> json) {
uploadMode = json['upload_mode'];
uploadSecret = json['upload_secret'];
uploadHost = json['upload_host'];
openWorkorder = json['open_workorder'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['upload_mode'] = this.uploadMode;
data['upload_secret'] = this.uploadSecret;
data['upload_host'] = this.uploadHost;
data['open_workorder'] = this.openWorkorder;
return data;
}
}
\ No newline at end of file
import 'dart:convert';
class ImMessage {
String bizType;
String version;
dynamic payload;
int fromAccount;
int toAccount;
int timestamp;
int read;
int key;
int transferAccount;
bool isShowCancel = false;
int uploadProgress;
String avatar;
String nickname;
bool isShowDate = false;
ImMessage(
{this.bizType,
this.key,
this.isShowDate = false,
this.uploadProgress,
this.version,
this.avatar,
this.nickname,
this.isShowCancel = false,
this.payload,
this.fromAccount,
this.toAccount,
this.timestamp,
this.read,
this.transferAccount});
ImMessage.fromJson(Map<String, dynamic> json) {
this.bizType = json['biz_type'];
this.version = json['version'];
this.isShowCancel = json['is_show_cancel'] ?? false;
this.payload = json['payload'];
this.key = json['key'];
this.fromAccount = json['from_account'];
this.toAccount = json['to_account'];
this.timestamp = json['timestamp'];
this.avatar = json['avatar'];
this.read = json['read'];
this.uploadProgress = json['upload_progress'] ?? 0;
this.nickname = json['nickname'];
this.transferAccount = json['transfer_account'];
}
String toBase64() {
return base64Encode(utf8.encode(json.encode(toJson())));
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['biz_type'] = this.bizType;
data['version'] = this.version;
data['key'] = this.key;
data['upload_progress'] = this.uploadProgress;
data['is_show_cancel'] = this.isShowCancel;
data['payload'] = this.payload;
data['from_account'] = this.fromAccount;
data['to_account'] = this.toAccount;
data['timestamp'] = this.timestamp;
data['avatar'] = this.avatar;
data['read'] = this.read;
data['nickname'] = this.nickname;
data['transfer_account'] = this.transferAccount;
return data;
}
}
class ImTokenInfo {
String appId;
String appPackage;
String appAccount;
String miUserId;
String miUserSecurityKey;
String token;
String feDomainName;
String relayDomainName;
int miChid;
int regionBucket;
ImTokenInfo(
{this.appId,
this.appPackage,
this.appAccount,
this.miUserId,
this.miUserSecurityKey,
this.token,
this.feDomainName,
this.relayDomainName,
this.miChid,
this.regionBucket});
ImTokenInfo.fromJson(Map<String, dynamic> json) {
this.appId = json['appId'];
this.appPackage = json['appPackage'];
this.appAccount = json['appAccount'];
this.miUserId = json['miUserId'];
this.miUserSecurityKey = json['miUserSecurityKey'];
this.token = json['token'];
this.feDomainName = json['feDomainName'];
this.relayDomainName = json['relayDomainName'];
this.miChid = json['miChid'];
this.regionBucket = json['regionBucket'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['appId'] = this.appId;
data['appPackage'] = this.appPackage;
data['appAccount'] = this.appAccount;
data['miUserId'] = this.miUserId;
data['miUserSecurityKey'] = this.miUserSecurityKey;
data['token'] = this.token;
data['feDomainName'] = this.feDomainName;
data['relayDomainName'] = this.relayDomainName;
data['miChid'] = this.miChid;
data['regionBucket'] = this.regionBucket;
return data;
}
}
class ImUser {
String avatar;
String address;
String nickname;
String token;
String phone;
String remarks;
int id;
int uid;
int platform;
int online;
int updateAt;
int lastActivity;
int createAt;
ImUser(
{this.avatar,
this.address,
this.nickname,
this.token,
this.phone,
this.remarks,
this.id,
this.uid,
this.platform,
this.online,
this.updateAt,
this.lastActivity,
this.createAt});
ImUser.fromJson(Map<String, dynamic> json) {
this.avatar = json['avatar'];
this.address = json['address'];
this.nickname = json['nickname'];
this.token = json['token'];
this.phone = json['phone'];
this.remarks = json['remarks'];
this.id = json['id'];
this.uid = json['uid'];
this.platform = json['platform'];
this.online = json['online'];
this.updateAt = json['update_at'];
this.lastActivity = json['last_activity'];
this.createAt = json['create_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['avatar'] = this.avatar;
data['address'] = this.address;
data['nickname'] = this.nickname;
data['token'] = this.token;
data['phone'] = this.phone;
data['remarks'] = this.remarks;
data['id'] = this.id;
data['uid'] = this.uid;
data['platform'] = this.platform;
data['online'] = this.online;
data['update_at'] = this.updateAt;
data['last_activity'] = this.lastActivity;
data['create_at'] = this.createAt;
return data;
}
}
class KnowledgeModel {
String title;
String subTitle;
String content;
int id;
int uid;
int platform;
int updateAt;
int createAt;
KnowledgeModel(
{this.title,
this.subTitle,
this.content,
this.id,
this.uid,
this.platform,
this.updateAt,
this.createAt});
KnowledgeModel.fromJson(Map<String, dynamic> json) {
this.title = json['title'];
this.subTitle = json['sub_title'];
this.content = json['content'];
this.id = json['id'];
this.uid = json['uid'];
this.platform = json['platform'];
this.updateAt = json['update_at'];
this.createAt = json['create_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['title'] = this.title;
data['sub_title'] = this.subTitle;
data['content'] = this.content;
data['id'] = this.id;
data['uid'] = this.uid;
data['platform'] = this.platform;
data['update_at'] = this.updateAt;
data['create_at'] = this.createAt;
return data;
}
}
class Robot {
int id;
String nickname;
String avatar;
String welcome;
String understand;
String artificial;
String keyword;
String timeoutText;
String noServices;
String loogTimeWaitText;
int isRun;
int system;
int platform;
int updateAt;
int createAt;
Robot(
{this.id,
this.nickname,
this.avatar,
this.welcome,
this.understand,
this.artificial,
this.keyword,
this.timeoutText,
this.noServices,
this.loogTimeWaitText,
this.isRun,
this.system,
this.platform,
this.updateAt,
this.createAt});
Robot.fromJson(Map<String, dynamic> json) {
id = json['id'];
nickname = json['nickname'];
avatar = json['avatar'];
welcome = json['welcome'];
understand = json['understand'];
artificial = json['artificial'];
keyword = json['keyword'];
timeoutText = json['timeout_text'];
noServices = json['no_services'];
loogTimeWaitText = json['loog_time_wait_text'];
isRun = json['switch'];
system = json['system'];
platform = json['platform'];
updateAt = json['update_at'];
createAt = json['create_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['nickname'] = this.nickname;
data['avatar'] = this.avatar;
data['welcome'] = this.welcome;
data['understand'] = this.understand;
data['artificial'] = this.artificial;
data['keyword'] = this.keyword;
data['timeout_text'] = this.timeoutText;
data['no_services'] = this.noServices;
data['loog_time_wait_text'] = this.loogTimeWaitText;
data['switch'] = this.isRun;
data['system'] = this.system;
data['platform'] = this.platform;
data['update_at'] = this.updateAt;
data['create_at'] = this.createAt;
return data;
}
}
class ServiceUser {
String nickname;
String avatar;
int id;
ServiceUser({this.nickname, this.avatar, this.id});
ServiceUser.fromJson(Map<String, dynamic> json) {
this.nickname = json['nickname'];
this.avatar = json['avatar'];
this.id = json['id'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['nickname'] = this.nickname;
data['avatar'] = this.avatar;
data['id'] = this.id;
return data;
}
}
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