Commit db2b66d4 by keith

update code

parent 9541c36a
Showing with 443 additions and 173 deletions
...@@ -47,8 +47,8 @@ func (c *BaseController) GetAdminAuthInfo() *models.Auths { ...@@ -47,8 +47,8 @@ func (c *BaseController) GetAdminAuthInfo() *models.Auths {
var authsRepository = services.GetAuthsRepositoryInstance() var authsRepository = services.GetAuthsRepositoryInstance()
auth := authsRepository.GetAdminAuthInfo(token) auth := authsRepository.GetAdminAuthInfo(token)
if auth == nil { if auth == nil {
logs.Warn("GetAdminAuthInfo fun error------------登录已失效!") logs.Warn("GetAdminAuthInfo fun error------------用户效验失败!")
c.JSON(configs.ResponseFail, "登录已失效!", nil) c.JSON(configs.ResponseFail, "用户效验失败!", nil)
} }
return auth return auth
} }
...@@ -59,7 +59,7 @@ func (c *BaseController) GetUserInfo() *models.User { ...@@ -59,7 +59,7 @@ func (c *BaseController) GetUserInfo() *models.User {
var userRepository = services.GetUserRepositoryInstance() var userRepository = services.GetUserRepositoryInstance()
user := userRepository.GetUserWithToken(token) user := userRepository.GetUserWithToken(token)
if user == nil { if user == nil {
logs.Warn("GetUserInfo get current user info error------------登录已失效!") logs.Warn("GetUserInfo get current user info error------------用户效验失败!")
} }
return user return user
} }
...@@ -172,11 +172,10 @@ func (c *ContactController) Transfer() { ...@@ -172,11 +172,10 @@ func (c *ContactController) Transfer() {
tk := time.NewTimer(1 * time.Second) tk := time.NewTimer(1 * time.Second)
select { select {
case <-tk.C: case <-tk.C:
usersID := []int64{admin.ID, transferDto.UserAccount}
// ContactRepository instance // ContactRepository instance
contactRepository := services.GetContactRepositoryInstance() contactRepository := services.GetContactRepositoryInstance()
_, err := contactRepository.UpdateIsSessionEnd(usersID, 1) _, err := contactRepository.UpdateIsSessionEnd(transferDto.UserAccount)
if err != nil { if err != nil {
logs.Info(err) logs.Info(err)
......
...@@ -267,7 +267,11 @@ func (c *PublicController) Robot() { ...@@ -267,7 +267,11 @@ func (c *PublicController) Robot() {
// get user // get user
user := c.GetUserInfo() user := c.GetUserInfo()
if user == nil { if user == nil {
c.JSON(configs.ResponseFail, "fail!", "") // GetAdminAuthInfo
auth := c.GetAdminAuthInfo()
if auth == nil {
c.JSON(configs.ResponseFail, "fail,!", nil)
}
} }
// request body // request body
......
...@@ -190,3 +190,20 @@ func (c *WorkOrderController) CloseWorkOrder() { ...@@ -190,3 +190,20 @@ func (c *WorkOrderController) CloseWorkOrder() {
c.JSON(configs.ResponseSucess, "工单已关闭!", rows) c.JSON(configs.ResponseSucess, "工单已关闭!", rows)
} }
// GetWorkOrders get workorders
func (c *WorkOrderController) GetWorkOrders() {
request := models.WorkOrderPaginationDto{}
if err := json.Unmarshal(c.Ctx.Input.RequestBody, &request); err != nil {
c.JSON(configs.ResponseFail, "参数有误,请检查!", nil)
}
res, err := c.WorkOrderRepository.GetWorkOrders(request)
if err != nil {
c.JSON(configs.ResponseFail, "查询失败!", &res)
}
c.JSON(configs.ResponseSucess, "查询成功", &res)
}
...@@ -5,12 +5,14 @@ import ( ...@@ -5,12 +5,14 @@ import (
"github.com/astaxie/beego" "github.com/astaxie/beego"
"github.com/astaxie/beego/logs" "github.com/astaxie/beego/logs"
"github.com/astaxie/beego/toolbox"
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"
"kefu_server/controllers" "kefu_server/controllers"
"kefu_server/db" "kefu_server/db"
"kefu_server/grpcs" "kefu_server/grpcs"
_ "kefu_server/routers" _ "kefu_server/routers"
"kefu_server/task"
) )
// Initialization log // Initialization log
...@@ -38,9 +40,9 @@ func main() { ...@@ -38,9 +40,9 @@ func main() {
initLog() initLog()
// init task // init task
// task.Run() task.Run()
// toolbox.StartTask() toolbox.StartTask()
// defer toolbox.StopTask() defer toolbox.StopTask()
/// Static file configuration /// Static file configuration
beego.SetStaticPath("/", "public/client") beego.SetStaticPath("/", "public/client")
......
package models
// WorkOrderPaginationDto struct
type WorkOrderPaginationDto struct {
PageSize int `json:"page_size"`
PageOn int `json:"page_on"`
Total int64 `json:"total"`
Tid int64 `json:"tid"`
Status int `json:"status"`
List interface{} `json:"list"`
}
File mode changed
body{min-width:240px;overflow:hidden;height:100vh;background-color:#f3f3f3}.mint-header.is-fixed{height:50px!important;background:linear-gradient(90deg,#26a2ff,#736cde)}.mint-header.is-fixed .mint-header-title{font-size:15px}.mint-header,.mint-tabbar{min-width:240px;z-index:999999999!important}.mint-header .is-right img{width:25px}.mint-header .mint-button .mintui{font-size:23px!important}.mini-im-loading{display:-ms-flexbox;display:flex;width:100%;position:fixed;height:100vh;top:0;left:0;z-index:9;right:0;background-color:#fff!important;margin:auto;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.mini-im-loading.pc-mini-im-loading{width:360px!important;height:360px!important;top:-48px;bottom:0;margin:auto!important}.workorder-create-picker .picker-item{font-size:15px}
\ No newline at end of file
body{min-width:240px;overflow:hidden;height:100vh;background-color:#f3f3f3}.mint-header.is-fixed{height:50px!important;background:linear-gradient(90deg,#26a2ff,#736cde)}.mint-header.is-fixed .mint-header-title{font-size:15px}.mint-header,.mint-tabbar{min-width:240px;z-index:999999999!important}.mint-header .is-right img{width:25px}.mint-header .mint-button .mintui{font-size:23px!important}.mint-tabbar{z-index:999999999!important;background-color:#fff!important}.mint-loadmore-spinner{width:15px!important;height:15px!important}.mini-im-container{margin:0 auto;padding:50px 0 100px;overflow:hidden;height:100vh;box-sizing:border-box}.mini-im-container .input-ing{width:100vw;height:25px;position:fixed;top:0;left:0;right:0;background-color:#26a2ff!important;z-index:9;color:#fff;margin:auto;text-align:center;font-size:14px;line-height:25px}.mini-im-container .mini-im-loading{display:-ms-flexbox;display:flex;min-width:240px;width:100%;position:fixed;top:0;left:0;right:0;background-color:#fff!important;margin:auto;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.mini-im-container-no-pto{padding-top:0!important}.mini-im-tabbar-input{width:100%;padding:5px 10px;overflow:hidden;height:100px;display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:justify;justify-content:space-between;position:fixed;bottom:0;z-index:9;background-color:#fff!important;border-top:1px solid #f2f2f2;left:0;right:0;margin:0 auto;box-sizing:border-box}.mini-im-tabbar-input textarea{outline:none;-webkit-appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;border-radius:5px;height:65px;-ms-flex-positive:1;padding:8px 0;font-size:14px;color:#666;background-color:#fff;display:block;box-sizing:border-box;resize:none;-ms-flex-negative:1;flex-shrink:1;flex-grow:1;width:100px}.mini-im-tabbar-input span{width:25px;height:25px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.mini-im-tabbar-input span img{width:28px}.mini-im-tabbar-input span.expression-btn{position:absolute;left:40px;top:6px;z-index:99}.mini-im-tabbar-input span.photo-btn{position:absolute;left:10px;top:5px;overflow:hidden;z-index:99}.mini-im-tabbar-input span.photo-btn img{width:22px}.mini-im-tabbar-input span.photo-btn input{width:100%;height:100%;position:absolute;top:0;left:0;opacity:0}.mini-im-tabbar-input span.serverci{width:70px;position:absolute;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;top:5px;right:10px}.mini-im-tabbar-input span.serverci img{width:26px}.mini-im-tabbar-input span.serverci span{width:70px;background-color:hsla(0,0%,95.3%,.439);color:#999;font-size:14px}.mini-im-tabbar-input span.serverci.on{left:75px;-ms-flex-pack:start;justify-content:flex-start;right:auto}.mini-im-tabbar-input .mini-input-send{width:55px;height:30px;color:#fff;line-height:30px;text-align:center;border-radius:3px;border:none;font-size:14px;background:linear-gradient(90deg,#26a2ff,#736cde);-ms-flex-negative:0;flex-shrink:0}.mini-im-tabbar-input .mini-input-send:active{opacity:.8}.mini-im-emoji{position:fixed;top:0;padding:5px 0;z-index:9}.mini-im-emoji,.mini-im-emoji .mini-im-emoji-content{width:100%;height:100vh;left:0;right:0;margin:0 auto;background-color:#fff}.mini-im-emoji .mini-im-emoji-content{padding:50px 0 5px;position:absolute;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;overflow:hidden;bottom:0;text-align:center;box-shadow:0 2px 2px 1px rgba(0,0,0,.1)}.mini-im-emoji .mini-im-emoji-content span{display:inline-block;width:28px;height:28px;padding:2px;text-align:center;font-size:23px}.mini-im-body{position:relative;height:100%;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;background-color:#f3f3f3;margin:0 auto;overflow:hidden;z-index:1}.mini-im-body ul{position:absolute;z-index:1;-webkit-tap-highlight-color:rgba(0,0,0,0);width:100%;transform:translateZ(0);-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;-o-text-size-adjust:none;text-size-adjust:none}.mini-im-body .loading{position:fixed;bottom:0;margin:auto}.mini-im-body .loading,.mini-im-body .no-network{height:100%;top:0;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.mini-im-body .no-network{width:100%;background-color:#fff;position:absolute;margin:0 auto;-ms-flex-direction:column;flex-direction:column;z-index:9}.mini-im-body .no-network span{color:#999;font-size:13px;margin:20px 0}.mini-im-body .no-network button{width:100px;height:30px;color:#fff;line-height:30px;text-align:center;border-radius:3px;border:none;font-size:14px;background:linear-gradient(90deg,#26a2ff,#736cde);-ms-flex-negative:0;flex-shrink:0}.mini-im-knowledge{width:100vw;height:100vh;background-color:rgba(0,0,0,.2);position:fixed;z-index:8;top:0;left:0;right:0;margin:0 auto;box-sizing:border-box;padding-bottom:100px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:end;justify-content:flex-end}.mini-im-knowledge .mask{-ms-flex-positive:1;flex-grow:1;width:100vw;height:100px}.mini-im-knowledge span{background-color:#fff;font-size:14px;color:#666;padding:10px}.mini-im-knowledge ul{background-color:#fff}.mini-im-knowledge ul li{font-size:13px;cursor:pointer;color:#56b7ff;padding:6px 10px;border-top:1px solid #f2f2f2}.mint-loadmore{height:100%}.mint-loadmore-text{color:#666;font-size:14px}.mini-im-chat-list{padding:20px 10px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.mini-im-chat-list .message-loading{padding-bottom:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.mini-im-chat-list .mini-im-chat-item{display:-ms-flexbox;display:flex;margin-bottom:15px}.mini-im-chat-list .mini-im-chat-item .chat-avatar{width:30px;height:30px;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;overflow:hidden;margin-top:2px;box-shadow:1px 1px 2px 0 rgba(0,0,0,.3);border-radius:100%}.mini-im-chat-list .mini-im-chat-item .chat-avatar img{width:100%;height:100%;border-radius:100%}.mini-im-chat-list .mini-im-chat-item .chat-content{width:100%;padding-left:10px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-username{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-bottom:5px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-username span{font-size:12px;color:#666;font-weight:500}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-username em{color:#666;font-size:12px;margin-left:8px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .cancel-btn{font-size:12px;color:#26a2ff!important;margin-right:5px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .text{padding:5px 8px;background-color:#fff;border-radius:3px;font-size:14px;color:#333;max-width:85%;position:relative;box-shadow:1px 2px 2px 0 rgba(0,0,0,.1);-webkit-user-select:text;-o-user-select:text;-ms-user-select:text;user-select:text;word-break:break-all}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .text:before{content:"";display:block;position:absolute;top:5px;left:-9px;width:0;height:0;overflow:hidden;font-size:0;line-height:0;border:5px;border-radius:2px;border-style:dashed solid dashed dashed;border-color:transparent #fff transparent transparent}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .photo{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .photo img{width:120px;display:block;border-radius:5px;cursor:pointer}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .photo span{font-size:12px;color:#999;padding-right:5px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .system{width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .system span{text-align:center;font-size:12px;color:#999}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .system .content{margin-top:1.5px;height:25px;text-align:center}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .system .content span{padding:0 10px;text-align:center;font-size:12px;border-radius:5px;display:inline-block;line-height:22px;height:22px;min-width:80px;color:#949393}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .knowledge{padding:5px 8px;background-color:#fff;border-radius:3px;font-size:13px;color:#333;max-width:80%;position:relative;box-shadow:1px 2px 2px 0 rgba(0,0,0,.1);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .knowledge .title{min-height:25px;font-size:14px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .knowledge a{font-size:13px;color:#26a2ff;text-decoration:none;width:100%;display:-ms-flexbox;display:flex;min-height:25px}.mini-im-chat-list .mini-im-chat-item.self{-ms-flex-pack:end;justify-content:flex-end}.mini-im-chat-list .mini-im-chat-item.self .chat-content{padding-right:10px}.mini-im-chat-list .mini-im-chat-item.self .chat-body{-ms-flex-pack:end;justify-content:flex-end}.mini-im-chat-list .mini-im-chat-item.self .chat-body .text{box-shadow:-1px 1px 3px 0 rgba(0,0,0,.1);background-color:#26a2ff;color:#fff;-webkit-user-select:text;-o-user-select:text;-ms-user-select:text;user-select:text;word-break:break-all}.mini-im-chat-list .mini-im-chat-item.self .chat-body .text:before{left:inherit;right:-9px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #26a2ff}.mini-im-chat-list .mini-im-chat-item.self .chat-avatar{-ms-flex-order:1;order:1}.mini-im-chat-list .mini-im-chat-item.self .chat-username{-ms-flex-pack:end;justify-content:flex-end}.mini-im-chat-list .mini-im-chat-item.self .chat-username em{-ms-flex-order:-2;order:-2;margin-right:5px}.mini-im-pc-container{width:360px;height:500px;position:fixed;top:0;left:0;right:0;bottom:0;margin:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:0!important;overflow:hidden;box-shadow:1px 1px 8px 2px #ccc}.mini-im-pc-container .mini-im-emoji,.mini-im-pc-container .mini-im-loading{width:360px!important;height:500px!important;bottom:0;margin:auto!important}.mini-im-pc-container .mini-im-emoji{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.mini-im-pc-container .cancel-btn{cursor:pointer}.mini-im-pc-container .mini-im-emoji-content{padding:8px!important;height:465px!important;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.mini-im-pc-container .mini-im-emoji-content span{width:26px;height:26px;cursor:pointer}.mini-im-pc-container .mini-im-body{width:360px;height:500px;position:static!important}.mini-im-pc-container .mini-im-body .mini-im-chat-list{padding:15px!important}.mini-im-pc-container .mini-im-pc-header{z-index:999999999!important;height:45px;background:linear-gradient(90deg,#26a2ff,#736cde);-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:0 10px;color:#fff}.mini-im-pc-container .mini-im-pc-header .right{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer}.mini-im-pc-container .mini-im-pc-header .right img{width:20px;margin-right:5px}.mini-im-pc-container .mini-im-pc-header .title{font-size:14px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mini-im-pc-container .mini-im-pc-header .title img{width:20px;margin-right:5px}.mini-im-pc-container .mini-im-pc-header span{font-size:14px}.mini-im-pc-container .mini-im-pc-header .close-btn{width:20px;height:35px;text-align:right;line-height:35px;cursor:pointer}.mini-im-pc-container .mini-im-tabbar-input{height:130px;overflow:hidden;padding:5px;position:relative;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;z-index:9}.mini-im-pc-container .mini-im-tabbar-input textarea{height:65px;padding-right:5px;margin:0}.mini-im-pc-container .mini-im-tabbar-input .mini-input-send{height:70px;width:60px;background:linear-gradient(90deg,#26a2ff,#736cde);color:#fff;border:0;cursor:pointer;border-radius:2px}.mini-im-pc-container .mini-im-tabbar-input span.photo-btn{left:3px}.mini-im-pc-container .mini-im-tabbar-input span.expression-btn{left:30px}.bscroll-vertical-scrollbar{right:0!important;height:100%!important}.bscroll-vertical-scrollbar .bscroll-indicator{width:4px!important;border:0!important;background:rgba(0,0,0,.2)!important;right:0!important}
\ No newline at end of file
.mint-tabbar{z-index:999999999!important;background-color:#fff!important}.mint-loadmore-spinner{width:15px!important;height:15px!important}.mini-im-container{margin:0 auto;padding:50px 0 100px;overflow:hidden;height:100vh;box-sizing:border-box}.mini-im-container .input-ing{width:100vw;height:25px;position:fixed;top:0;left:0;right:0;background-color:#26a2ff!important;z-index:9;color:#fff;margin:auto;text-align:center;font-size:14px;line-height:25px}.mini-im-container-no-pto{padding-top:0!important}.mini-im-tabbar-input{width:100%;padding:5px 10px;overflow:hidden;height:100px;display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:justify;justify-content:space-between;position:fixed;bottom:0;z-index:9;background-color:#fff!important;border-top:1px solid #f2f2f2;left:0;right:0;margin:0 auto;box-sizing:border-box}.mini-im-tabbar-input textarea{outline:none;-webkit-appearance:none;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;border-radius:5px;height:65px;-ms-flex-positive:1;padding:8px 0;font-size:14px;color:#666;background-color:#fff;display:block;box-sizing:border-box;resize:none;-ms-flex-negative:1;flex-shrink:1;flex-grow:1;width:100px}.mini-im-tabbar-input span{width:25px;height:25px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.mini-im-tabbar-input span img{width:28px}.mini-im-tabbar-input span.expression-btn{position:absolute;left:40px;top:6px;z-index:99}.mini-im-tabbar-input span.workorder-btn{position:absolute;left:62px;top:6px;z-index:99;width:70px;color:#999;font-size:14px;display:-ms-flexbox;display:flex}.mini-im-tabbar-input span.workorder-btn.show-header{left:100px}.mini-im-tabbar-input span.workorder-btn img{width:23px;height:23px}.mini-im-tabbar-input span.workorder-btn i{font-style:normal}.mini-im-tabbar-input span.photo-btn{position:absolute;left:10px;top:5px;overflow:hidden;z-index:99}.mini-im-tabbar-input span.photo-btn img{width:22px}.mini-im-tabbar-input span.photo-btn input{width:100%;height:100%;position:absolute;top:0;left:0;opacity:0}.mini-im-tabbar-input span.serverci{width:70px;position:absolute;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;top:5px;right:10px}.mini-im-tabbar-input span.serverci img{width:26px}.mini-im-tabbar-input span.serverci span{width:70px;background-color:hsla(0,0%,95.3%,.439);color:#999;font-size:14px}.mini-im-tabbar-input span.serverci.on{left:75px;-ms-flex-pack:start;justify-content:flex-start;right:auto}.mini-im-tabbar-input .mini-input-send{width:55px;height:30px;color:#fff;line-height:30px;text-align:center;border-radius:3px;border:none;font-size:14px;background:linear-gradient(90deg,#26a2ff,#736cde);-ms-flex-negative:0;flex-shrink:0}.mini-im-tabbar-input .mini-input-send:active{opacity:.8}.mini-im-emoji{position:fixed;top:0;padding:5px 0;z-index:9}.mini-im-emoji,.mini-im-emoji .mini-im-emoji-content{width:100%;height:100vh;left:0;right:0;margin:0 auto;background-color:#fff}.mini-im-emoji .mini-im-emoji-content{padding:50px 0 5px;position:absolute;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;overflow:hidden;bottom:0;text-align:center;box-shadow:0 2px 2px 1px rgba(0,0,0,.1)}.mini-im-emoji .mini-im-emoji-content span{display:inline-block;width:28px;height:28px;padding:2px;text-align:center;font-size:23px}.mini-im-body{position:relative;height:100%;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;background-color:#f3f3f3;margin:0 auto;overflow:hidden;z-index:1}.mini-im-body ul{position:absolute;z-index:1;-webkit-tap-highlight-color:rgba(0,0,0,0);width:100%;transform:translateZ(0);-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;-o-text-size-adjust:none;text-size-adjust:none}.mini-im-body .loading{height:100%;position:fixed;bottom:0;margin:auto}.mini-im-body .loading,.mini-im-body .top-loading{top:0;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.mini-im-body .top-loading{width:100%;height:35px;position:absolute;margin:0 auto;z-index:8}.mini-im-body .top-loading span{color:#999;font-size:13px;margin-left:5px}.mini-im-knowledge{width:100vw;height:100vh;background-color:rgba(0,0,0,.2);position:fixed;z-index:8;top:0;left:0;right:0;margin:0 auto;box-sizing:border-box;padding-bottom:100px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:end;justify-content:flex-end}.mini-im-knowledge .mask{-ms-flex-positive:1;flex-grow:1;width:100vw;height:100px}.mini-im-knowledge span{background-color:#fff;font-size:14px;color:#666;padding:10px}.mini-im-knowledge ul{background-color:#fff}.mini-im-knowledge ul li{font-size:13px;cursor:pointer;color:#56b7ff;padding:6px 10px;border-top:1px solid #f2f2f2}.mint-loadmore{height:100%}.mint-loadmore-text{color:#666;font-size:14px}.mini-im-chat-list{padding:20px 10px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.mini-im-chat-list .message-loading{padding-bottom:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.mini-im-chat-list .mini-im-chat-item{display:-ms-flexbox;display:flex;margin-bottom:15px}.mini-im-chat-list .mini-im-chat-item .chat-avatar{width:30px;height:30px;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;overflow:hidden;margin-top:2px;box-shadow:1px 1px 2px 0 rgba(0,0,0,.3);border-radius:100%}.mini-im-chat-list .mini-im-chat-item .chat-avatar img{width:100%;height:100%;border-radius:100%}.mini-im-chat-list .mini-im-chat-item .chat-content{width:100%;padding-left:10px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-username{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-bottom:5px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-username span{font-size:12px;color:#666;font-weight:500}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-username em{color:#666;font-size:12px;margin-left:8px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .cancel-btn{font-size:12px;color:#26a2ff!important;margin-right:5px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .text{padding:5px 8px;background-color:#fff;border-radius:3px;font-size:14px;color:#333;max-width:85%;position:relative;box-shadow:1px 2px 2px 0 rgba(0,0,0,.1);-webkit-user-select:text;-o-user-select:text;-ms-user-select:text;user-select:text;word-break:break-all}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .text:before{content:"";display:block;position:absolute;top:5px;left:-9px;width:0;height:0;overflow:hidden;font-size:0;line-height:0;border:5px;border-radius:2px;border-style:dashed solid dashed dashed;border-color:transparent #fff transparent transparent}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .photo{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .photo img{width:120px;display:block;border-radius:5px;cursor:pointer}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .photo span{font-size:12px;color:#999;padding-right:5px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .system{width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .system span{text-align:center;font-size:12px;color:#999}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .system .content{margin-top:1.5px;height:25px;text-align:center}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .system .content span{padding:0 10px;text-align:center;font-size:12px;border-radius:5px;display:inline-block;line-height:22px;height:22px;min-width:80px;color:#949393}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .knowledge{padding:5px 8px;background-color:#fff;border-radius:3px;font-size:13px;color:#333;max-width:80%;position:relative;box-shadow:1px 2px 2px 0 rgba(0,0,0,.1);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .knowledge .title{min-height:25px;font-size:14px}.mini-im-chat-list .mini-im-chat-item .chat-content .chat-body .knowledge a{font-size:13px;color:#26a2ff;text-decoration:none;width:100%;display:-ms-flexbox;display:flex;min-height:25px}.mini-im-chat-list .mini-im-chat-item.self{-ms-flex-pack:end;justify-content:flex-end}.mini-im-chat-list .mini-im-chat-item.self .chat-content{padding-right:10px}.mini-im-chat-list .mini-im-chat-item.self .chat-body{-ms-flex-pack:end;justify-content:flex-end}.mini-im-chat-list .mini-im-chat-item.self .chat-body .text{box-shadow:-1px 1px 3px 0 rgba(0,0,0,.1);background-color:#26a2ff;color:#fff;-webkit-user-select:text;-o-user-select:text;-ms-user-select:text;user-select:text;word-break:break-all}.mini-im-chat-list .mini-im-chat-item.self .chat-body .text:before{left:inherit;right:-9px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #26a2ff}.mini-im-chat-list .mini-im-chat-item.self .chat-avatar{-ms-flex-order:1;order:1}.mini-im-chat-list .mini-im-chat-item.self .chat-username{-ms-flex-pack:end;justify-content:flex-end}.mini-im-chat-list .mini-im-chat-item.self .chat-username em{-ms-flex-order:-2;order:-2;margin-right:5px}.mini-im-pc-container{width:360px;height:500px;position:fixed;top:0;left:0;right:0;bottom:0;margin:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:0!important;overflow:hidden;box-shadow:1px 1px 8px 2px #ccc}.mini-im-pc-container .mini-im-emoji{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.mini-im-pc-container .cancel-btn{cursor:pointer}.mini-im-pc-container .mini-im-emoji-content{padding:8px!important;height:465px!important;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.mini-im-pc-container .mini-im-emoji-content span{width:26px;height:26px;cursor:pointer}.mini-im-pc-container .mini-im-body{width:360px;height:500px;position:static!important}.mini-im-pc-container .mini-im-body .mini-im-chat-list{padding:15px!important}.mini-im-pc-container .mini-im-pc-header{z-index:999999999!important;height:45px;background:linear-gradient(90deg,#26a2ff,#736cde);-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:0 10px;color:#fff}.mini-im-pc-container .mini-im-pc-header .right{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer}.mini-im-pc-container .mini-im-pc-header .right img{width:20px;margin-right:5px}.mini-im-pc-container .mini-im-pc-header .title{font-size:14px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mini-im-pc-container .mini-im-pc-header .title img{width:20px;margin-right:5px}.mini-im-pc-container .mini-im-pc-header span{font-size:14px}.mini-im-pc-container .mini-im-pc-header .close-btn{width:20px;height:35px;text-align:right;line-height:35px;cursor:pointer}.mini-im-pc-container .mini-im-tabbar-input{height:130px;overflow:hidden;padding:5px;position:relative;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;z-index:9}.mini-im-pc-container .mini-im-tabbar-input textarea{height:65px;padding-right:5px;margin:0}.mini-im-pc-container .mini-im-tabbar-input .mini-input-send{height:70px;width:60px;background:linear-gradient(90deg,#26a2ff,#736cde);color:#fff;border:0;cursor:pointer;border-radius:2px}.mini-im-pc-container .mini-im-tabbar-input span.photo-btn{left:3px}.mini-im-pc-container .mini-im-tabbar-input span.expression-btn{left:35px}.bscroll-vertical-scrollbar{right:0!important;height:100%!important}.bscroll-vertical-scrollbar .bscroll-indicator{width:4px!important;border:0!important;background:rgba(0,0,0,.2)!important;right:0!important}
\ No newline at end of file
.no-data[data-v-27b64799]{text-align:center;padding-top:50px}.no-data img[data-v-27b64799]{width:50px;height:50px}.no-data div[data-v-27b64799]{color:#666;font-size:14px}.list[data-v-27b64799]{padding-top:50px}.list.hide-header[data-v-27b64799]{padding-top:0}.list li[data-v-27b64799]{padding:10px 20px;background:url(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) 10px no-repeat;background-size:25px;padding-left:40px;padding-right:70px;border-bottom:1px solid #ddd;position:relative;height:40px}.list li .title[data-v-27b64799]{font-size:15px;color:#333;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.list li .type[data-v-27b64799]{font-size:13px;color:#666}.list li .date[data-v-27b64799]{margin-left:10px;font-size:13px;color:#999}.list li i[data-v-27b64799]{font-style:normal;font-size:13px;position:absolute;right:10px;top:0;height:20px;bottom:0;margin:auto 0}
\ No newline at end of file
.content[data-v-43d71195]{padding:50px 10px}.content .field-line[data-v-43d71195]{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-43d71195]:first-child{width:35px}.content .field-line input[data-v-43d71195]{-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-43d71195]{-ms-flex-line-pack:left;align-content:left;-ms-flex-align:left;align-items:left}.content .field-line.arrow-right[data-v-43d71195]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAFDUlEQVR4Xu2dMU8UQRTH32wBvR/AxmhjJZVS3R4tsdCY2NoabY100IDGUo2x0s7EaGFDtzubkPAdaCz8AFjRkRuzATwCd3sz+24nb+b9aXkw8/7/3755M7MchvClWgGjOnskTwBAOQQAAAAoV0B5+qgAAEC5AsrTRwUAAMoVUJ4+KgAAUK6A8vRRAQCAcgWUp48KAACUK6A8fVQAACBbgaZpPhPRfefcbefccVEUvyeTyZvxeLwve+ZpzE5sBTg4OLhzenp6NE/GyWSys7GxsZ2GzHJnKRYAa60lolGXdICAD5ZIAKy1T4nom096gMBHpfkxIgGo6/qjMea5b2qAwFep63FSAfhpjHkUkhYgCFFrGisSAGvtCyJ6H5oSIAhVjGS+FFpV1VpRFIdEtBqaEiAIU0xkBWhTaJpm1zm3FZbOWTQg8FdNLABtCtba70T0xD+daSQg8FNNNABcCIhouyzLHT8pdEaJB4ALASpBN9hJAAAIhqtOyQAACIaBICkAuBCgJ0jkJHAR69gdLFLI//vJVYCL1DgQoB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ABBpS7xJAYB4WoscCQCItCXepABAPK1FjgQARNoSb1IAIJ7WIkcCACJtiTcpABBPa5EjAQCRtsSbFACIp7XIkQCASFviTQoAxNNa5Ej/AAxh3J+K76XOAAAAAElFTkSuQmCC) 100% no-repeat;background-size:18px;padding-right:25px}.content .field-line.file[data-v-43d71195]{position:relative;overflow:hidden;margin-top:20px;border-top:1px solid #ddd}.content .field-line.file .ed[data-v-43d71195]{color:#8bc34a}.content .field-line.file input[data-v-43d71195]{font-size:100px;opacity:0;position:absolute;top:0;right:0}.content .field-line.textarea[data-v-43d71195]{-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-43d71195]{-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-43d71195]{font-size:11px;color:#ff9800}.content.hide-header[data-v-43d71195]{padding-top:0}.content .sub-btn[data-v-43d71195]{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-43d71195]:active{opacity:.8}.types-sheet[data-v-43d71195]{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-43d71195]{height:250px;width:100vw;position:absolute;bottom:0;left:0;right:0;margin:0 auto;background-color:#fff}.types-sheet .title[data-v-43d71195]{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-43d71195]{font-size:14px;color:#333}.types-sheet .title .sub-btn[data-v-43d71195]{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-43d71195]:active{opacity:.8}
\ No newline at end of file
.container[data-v-1d2064aa]{height:100vh;overflow:hidden;overflow-y:auto}.content[data-v-1d2064aa]{padding-top:50px;padding-bottom:90px}.content .no-data[data-v-1d2064aa]{color:#666;font-size:14px}.content .workorder-close[data-v-1d2064aa]{text-align:center;color:#666;font-size:14px;padding:10px}.content.hide-header[data-v-1d2064aa]{padding-top:0}.content .head[data-v-1d2064aa]{margin:0 10px;padding:10px 0;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .head .con[data-v-1d2064aa]{font-size:15px;color:#333;display:-ms-flexbox;display:flex;margin-bottom:8px}.content .head .con span[data-v-1d2064aa]{-ms-flex-flow:1;flex-flow:1}.content .head .con span[data-v-1d2064aa]:first-child{-ms-flex-flow:0;flex-flow:0;-ms-flex-negative:0;flex-shrink:0;width:45px}.content .head .con i[data-v-1d2064aa]{font-style:normal}.content .comments[data-v-1d2064aa]{padding:10px}.content .comments .item[data-v-1d2064aa]{display:-ms-flexbox;display:flex}.content .comments .item .avatar[data-v-1d2064aa]{padding-top:10px;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .comments .item .avatar img[data-v-1d2064aa]{width:30px;height:30px;border-radius:100px;display:block}.content .comments .item .right[data-v-1d2064aa]{padding:10px 5px;-ms-flex-positive:1;flex-grow:1;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .comments .item .right .nickname[data-v-1d2064aa]{font-size:15px;color:#333}.content .comments .item .right .detail[data-v-1d2064aa]{font-size:15px;color:#333;margin-top:5px}.content .comments .item .right .date[data-v-1d2064aa]{color:#999;font-size:14px;margin-top:5px}.content .comments .item:last-child .avatar[data-v-1d2064aa],.content .comments .item:last-child .right[data-v-1d2064aa]{border-bottom:0}.content .file-view[data-v-1d2064aa]{position:fixed;bottom:80px;left:0;right:0;padding:5px 10px;margin:0 auto;font-size:13px;color:#8bc34a}.content .file-view span[data-v-1d2064aa]{display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center}.content .file-view span img[data-v-1d2064aa]{width:20px;height:20px}.content .file-view span i[data-v-1d2064aa]{font-style:normal;margin-left:5px}.content .input-form[data-v-1d2064aa]{position:fixed;bottom:0;left:0;right:0;margin:0 auto;width:100%;height:80px;background-color:#fff;border-top:1px solid hsla(0,0%,62%,.13);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}.content .input-form textarea[data-v-1d2064aa]{height:45px;-ms-flex-positive:1;flex-grow:1;border-radius:0;border:0;color:#333;font-size:14px;resize:none}.content .input-form .icon-btn[data-v-1d2064aa]{background:url(../img/upload.76668586.png) 50% no-repeat;background-size:30px;width:55px;height:55px;overflow:hidden}.content .input-form .icon-btn input[data-v-1d2064aa]{display:block;width:100%;height:100%;font-size:100px;opacity:0}.content .input-form .sub-btn[data-v-1d2064aa]{display:block;width:55px;height:30px;color:#fff;line-height:30px;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 .input-form .sub-btn[data-v-1d2064aa]:active{opacity:.8}
\ No newline at end of file
No preview for this file type

8.64 KB | W: | H:

8.64 KB | W: | H:

public/client/img/expression.73c98a16.png
public/client/img/expression.73c98a16.png
public/client/img/expression.73c98a16.png
public/client/img/expression.73c98a16.png
  • 2-up
  • Swipe
  • Onion skin

5.59 KB | W: | H:

5.59 KB | W: | H:

public/client/img/photo_btn.c337b681.png
public/client/img/photo_btn.c337b681.png
public/client/img/photo_btn.c337b681.png
public/client/img/photo_btn.c337b681.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -18,9 +18,15 @@ ...@@ -18,9 +18,15 @@
fieldset, img { border:0; } fieldset, img { border:0; }
button, input, select, textarea { font-size:100%; outline: none;} button, input, select, textarea { font-size:100%; outline: none;}
table { border-collapse:collapse; border-spacing:0; } table { border-collapse:collapse; border-spacing:0; }
*{
-webkit-overflow-scrolling: touch!important;
-webkit-appearance: none!important;
-webkit-tap-highlight-color:rgba(0,0,0,0)!important;
outline:none!important;
}
input{ input{
border:0; border:0;
outline: none; outline: none !important;
} }
html{ html{
overflow: hidden; overflow: hidden;
...@@ -37,4 +43,4 @@ ...@@ -37,4 +43,4 @@
top:0 !important; top:0 !important;
min-height: inherit!important; min-height: inherit!important;
left:0 !important; right:0 !important; bottom:0 !important; margin: auto !important; left:0 !important; right:0 !important; bottom:0 !important; margin: auto !important;
}</style><link href=css/app.603f54ac.css rel=preload as=style><link href=css/chunk-vendors.5cea36ab.css rel=preload as=style><link href=js/app.eab418bf.js rel=preload as=script><link href=js/chunk-vendors.765f5c3b.js rel=preload as=script><link href=css/chunk-vendors.5cea36ab.css rel=stylesheet><link href=css/app.603f54ac.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.765f5c3b.js></script><script src=js/app.eab418bf.js></script></body></html> }</style><link href=css/chunk-5e6009ff.86cb9867.css rel=prefetch><link href=css/chunk-612d9b40.3daa63d4.css rel=prefetch><link href=css/chunk-6c9c88aa.4206eba5.css rel=prefetch><link href=css/chunk-c5fee4c4.d04a186e.css rel=prefetch><link href=js/chunk-5e6009ff.d7088d94.js rel=prefetch><link href=js/chunk-612d9b40.13a3a9bb.js rel=prefetch><link href=js/chunk-6c9c88aa.d765f1fb.js rel=prefetch><link href=js/chunk-c5fee4c4.1073caa4.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.0aa8e568.js rel=preload as=script><link href=js/chunk-vendors.a823ad66.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.a823ad66.js></script><script src=js/app.0aa8e568.js></script></body></html>
\ No newline at end of file \ No newline at end of file
(function(e){function t(t){for(var a,r,c=t[0],i=t[1],u=t[2],l=0,d=[];l<c.length;l++)r=c[l],Object.prototype.hasOwnProperty.call(o,r)&&o[r]&&d.push(o[r][0]),o[r]=0;for(a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a]);f&&f(t);while(d.length)d.shift()();return s.push.apply(s,u||[]),n()}function n(){for(var e,t=0;t<s.length;t++){for(var n=s[t],a=!0,r=1;r<n.length;r++){var c=n[r];0!==o[c]&&(a=!1)}a&&(s.splice(t--,1),e=i(i.s=n[0]))}return e}var a={},r={app:0},o={app:0},s=[];function c(e){return i.p+"js/"+({}[e]||e)+"."+{"chunk-5e6009ff":"d7088d94","chunk-612d9b40":"13a3a9bb","chunk-6c9c88aa":"d765f1fb","chunk-c5fee4c4":"1073caa4"}[e]+".js"}function i(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],n={"chunk-5e6009ff":1,"chunk-612d9b40":1,"chunk-6c9c88aa":1,"chunk-c5fee4c4":1};r[e]?t.push(r[e]):0!==r[e]&&n[e]&&t.push(r[e]=new Promise((function(t,n){for(var a="css/"+({}[e]||e)+"."+{"chunk-5e6009ff":"86cb9867","chunk-612d9b40":"3daa63d4","chunk-6c9c88aa":"4206eba5","chunk-c5fee4c4":"d04a186e"}[e]+".css",o=i.p+a,s=document.getElementsByTagName("link"),c=0;c<s.length;c++){var u=s[c],l=u.getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(l===a||l===o))return t()}var d=document.getElementsByTagName("style");for(c=0;c<d.length;c++){u=d[c],l=u.getAttribute("data-href");if(l===a||l===o)return t()}var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onload=t,f.onerror=function(t){var a=t&&t.target&&t.target.src||o,s=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");s.code="CSS_CHUNK_LOAD_FAILED",s.request=a,delete r[e],f.parentNode.removeChild(f),n(s)},f.href=o;var p=document.getElementsByTagName("head")[0];p.appendChild(f)})).then((function(){r[e]=0})));var a=o[e];if(0!==a)if(a)t.push(a[2]);else{var s=new Promise((function(t,n){a=o[e]=[t,n]}));t.push(a[2]=s);var u,l=document.createElement("script");l.charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.src=c(e);var d=new Error;u=function(t){l.onerror=l.onload=null,clearTimeout(f);var n=o[e];if(0!==n){if(n){var a=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+a+": "+r+")",d.name="ChunkLoadError",d.type=a,d.request=r,n[1](d)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:l})}),12e4);l.onerror=l.onload=u,document.head.appendChild(l)}return Promise.all(t)},i.m=e,i.c=a,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i.oe=function(e){throw console.error(e),e};var u=window["webpackJsonp"]=window["webpackJsonp"]||[],l=u.push.bind(u);u.push=t,u=u.slice();for(var d=0;d<u.length;d++)t(u[d]);var f=l;s.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},4678:function(e,t,n){var a={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-SG":"cdab","./en-SG.js":"cdab","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-nz":"6f50","./en-nz.js":"6f50","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-tw":"90ea","./zh-tw.js":"90ea"};function r(e){var t=o(e);return n(t)}function o(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}r.keys=function(){return Object.keys(a)},r.resolve=o,e.exports=r,r.id="4678"},"56d7":function(e,t,n){"use strict";n.r(t);n("cadf"),n("551c"),n("f751"),n("097d");var a=n("2b0e"),r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.isShowPageLoading?n("div",{staticClass:"mini-im-loading",class:{"pc-mini-im-loading":!e.isMobile}},[n("mt-spinner",{attrs:{type:"triple-bounce",color:"#26a2ff"}})],1):e._e(),n("router-view")],1)},o=[],s=(n("8e6e"),n("ac6a"),n("456d"),n("28a5"),n("bd86")),c=n("2f62");function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(s["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={name:"app",data:function(){return{}},computed:u({},Object(c["b"])(["isShowPageLoading","userAccount","isArtificial","isMobile","artificialAccount","robotAccount","platform","userLocal","uid","uid"])),created:function(){var e=this;this.getLocal(),setTimeout((function(){e.handelUrl(),e.runApp()}),500),this.onCheckIsOutSession()},methods:{runApp:function(){var e=this,t=this.$mimcInstance.getLocalCacheUser();t&&null!=this.userAccount&&this.userAccount!=t.id&&0!=this.userAccount&&localStorage.clear(),this.$mimcInstance.init({type:0,address:this.userLocal,uid:this.uid||0,platform:this.platform,account_id:this.userAccount||0},(function(t){if(e.upLastActivity(),e.$store.dispatch("onGetCompanyInfo"),e.$store.dispatch("onGetUploadSecret"),e.$store.dispatch("onGetWorkorderTypes"),e.$store.dispatch("onGetWorkorders"),t){e.$store.commit("updateState",{userAccount:t.id,userInfo:t});var n=e.$mimcInstance.robot;localStorage.setItem("robot_"+n.id,JSON.stringify(n)),e.$store.commit("updateState",{robotAccount:n.id,robotInfo:n}),e.$mimcInstance.login();var a=function t(){null!=e.$mimcInstance.user&&e.$mimcInstance.user.isLogin()?e.artificialAccount||(console.log("握手消息"),e.$mimcInstance.sendMessage("handshake",e.robotAccount,"")):setTimeout((function(){return t()}),200)};a()}else setTimeout((function(){return e.runApp()}),1e3)}))},handelUrl:function(){var e,t,n,a,r,o,s,c,i=this.$route.query;i&&i.c&&localStorage.clear();var u=this.queryToJson(localStorage.getItem("urlQuery"));u&&(i=Object.assign({},u,i)),i&&("0"==i.h&&(e=!1),"0"==i.m&&(t=!1,e=!1),i.u&&(n=parseInt(i.u)),i.p&&(c=parseInt(i.p)),i.uid&&(a=parseInt(i.uid)),"0"==i.r?(r=!0,o=parseInt(i.a)):s=parseInt(i.a));var l=localStorage.getItem("isArtificial"),d=localStorage.getItem("artificialAccount");"true"==l&&(r=!0,o=parseInt(d)),this.$store.commit("updateState",{isShowHeader:e,isMobile:t,userAccount:n,uid:a,isArtificial:r,artificialAccount:o,robotAccount:s,platform:c})},queryToJson:function(e){if(!e||""==e)return null;var t=e.substr(1,e.length).split("&");if(!t)return null;for(var n={},a=0;a<t.length;a++){var r=t[a].split("=");n[r[0]]=r[1]}return n},getLocal:function(){this.$store.dispatch("onGetLocal",this.$store.state.AmapAPPKey)},upLastActivity:function(){var e=this;this.onCheckIsOutSession();var t=this.$mimcInstance.getLocalCacheUser();t&&this.$store.dispatch("onUpdateLastActivity"),this.isArtificial&&localStorage.setItem("artificialTime",Date.now()),setTimeout((function(){return e.upLastActivity()}),6e4)},onCheckIsOutSession:function(){var e=localStorage.getItem("artificialTime");e&&(e=parseInt(e),Date.now()>e+6e5&&this.$store.commit("updateState",{isArtificial:!1,artificialAccount:null}))}}},d=l,f=(n("7faf"),n("2877")),p=Object(f["a"])(d,r,o,!1,null,null,null),m=p.exports,h=n("d1d4"),b=n.n(h),g=n("8c4f");a["default"].use(g["a"]);var j=new g["a"]({base:"",routes:[{path:"/",redirect:"/index"},{path:"/index",name:"index",component:function(){return n.e("chunk-5e6009ff").then(n.bind(null,"e0a0"))}},{path:"/workorder",name:"workorder",component:function(){return n.e("chunk-612d9b40").then(n.bind(null,"fb09"))}},{path:"/workorder/create",name:"workorder_create",component:function(){return n.e("chunk-6c9c88aa").then(n.bind(null,"ede1"))}},{path:"/workorder/detail/:id",name:"workorder_detail",component:function(){return n.e("chunk-c5fee4c4").then(n.bind(null,"4033"))}}]}),k=j,v=n("bc3a"),y=n.n(v),w={onGetMessages:function(e,t){var n=20;y.a.post("/public/messages",{timestamp:t.timestamp,page_size:n}).then((function(a){var r=[],o=a.data.data.list||[];(o.length<n||0==o.length)&&e.commit("updateState",{isLoadMorEnd:!0}),r=0==t.oldMsg.length&&o.length>0?a.data.data.list:o.length>0?o.concat(t.oldMsg):t.oldMsg,e.commit("updateState",{messages:r}),t.callback&&t.callback()})).catch((function(e){console.log(e)}))},onGetLocal:function(e,t){y.a.get("https://restapi.amap.com/v3/ip?key="+t).then((function(t){t.data.province&&e.commit("updateState",{userLocal:t.data.province+t.data.city})})).catch((function(e){console.error(e)}))},onCleanRead:function(){y.a.get("/public/clean_read/")},onUpdateLastActivity:function(){y.a.get("/public/activity/")},onToggleWindow:function(e,t){y.a.put("/public/window/",{window:t})},onGetCompanyInfo:function(e){y.a.get("/public/company").then((function(t){e.commit("updateState",{companyInfo:t.data.data})})).catch((function(e){console.error(e)}))},onGetUploadSecret:function(e){y.a.get("/public/secret").then((function(t){e.commit("updateState",{uploadToken:t.data.data})}))},onGetWorkorderTypes:function(e){y.a.get("/public/workorder/types").then((function(t){e.commit("updateState",{workorderTypes:t.data.data})}))},onGetWorkorders:function(e){y.a.get("/public/workorders").then((function(t){e.commit("updateState",{workorders:t.data.data})}))}},_={updateState:function(e,t){var n=e;for(var a in t)void 0!=t[a]&&(n[a]=t[a]);e=n}},M=(n("4917"),{platform:function(e){return e.platform},isArtificial:function(e){return e.isArtificial},isShowHeader:function(e){return e.isShowHeader},isMobile:function(e){return e.isMobile},uid:function(e){return e.uid},userAccount:function(e){return e.userAccount},artificialAccount:function(e){return e.artificialAccount},robotInfo:function(e){return e.robotInfo},robotAccount:function(e){return e.robotAccount},isLoadMorEnd:function(e){return e.isLoadMorEnd},messages:function(e){return e.messages||[]},userLocal:function(e){return e.userLocal},isLoadMorLoading:function(e){return e.isLoadMorLoading},userInfo:function(e){return e.userInfo},companyInfo:function(e){return e.companyInfo},uploadToken:function(e){return e.uploadToken},isIOS:function(){return!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)},isSafari:function(){return navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<1},isJudgeBigScreen:function(){var e=!1,t=window.screen.height/window.screen.width,n=window.screen.height==window.screen.availHeight?1.8:1.65;return t>n&&(e=!0),e},isShowPageLoading:function(e){return e.isShowPageLoading},workorders:function(e){return e.workorders},workorderTypes:function(e){return e.workorderTypes}}),I={platform:5,isShowPageLoading:!1,isShowHeader:!0,isMobile:!0,isArtificial:!1,uid:0,userAccount:0,artificialAccount:null,robotInfo:null,robotAccount:null,messages:[],isLoadMorEnd:!1,userLocal:"",AmapAPPKey:"",isLoadMorLoading:!1,userInfo:{},companyInfo:null,uploadToken:null,workorders:[],workorderTypes:[]};a["default"].use(c["a"]);var S=new c["a"].Store({state:I,getters:M,mutations:_,actions:w}),A=(n("394c"),n("76a0")),L=n.n(A),T=(n("aa35"),n("7f7f"),n("cea2")),C=n("c1df"),O={install:function(e,t){e.prototype.$myMethod=function(){console.log(t)},e.prototype.$formatUnixDate=function(e,t){return C(parseInt(e+"000")).format(t)},e.prototype.$formatFromNowDate=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm";return C().format("YYYYMMDD")==C(parseInt(e+"000")).format("YYYYMMDD")?"今天 "+C(parseInt(e+"000")).format("HH:mm"):C(parseInt(e+"000")).format(t)},e.prototype.$formatDate=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm:ss";return C(parseInt(e+"000")).format(t)},e.prototype.$robotNickname=function(e){for(var t,n=this.$store.getters.robots,a=0;a<n.length;a++)n[a].id==e&&(t=n[a].nickname);return t},e.prototype.$uploadFile=function(e){var t=e.mode,n=e.file,a=e.percent,r=e.success,o=e.fail,s=null,c=parseInt(1e4*Math.random()*(new Date).getTime())+n.name.substr(n.name.lastIndexOf("."));if(1==t){var i=new FormData;i.append("file",n),i.append("file_name",c),y.a.post("/public/upload",i).then((function(e){r&&r(e.data.data)})).catch((function(e){o&&o(e)}))}else if(2==t){var u={quality:.92,noCompressIfLarger:!0,maxWidth:1500};T["compressImage"](n,u).then((function(e){var t=T["upload"](e.dist,c,self.uploadToken.secret,{},{mimeType:null});s=t.subscribe({next:function(e){a&&a(e)},error:function(){var e=new FormData;e.append("fileType","image"),e.append("fileName","file"),e.append("key",c),e.append("token",self.uploadToken.secret),e.append("file",n),y.a.post("https://upload.qiniup.com",e).then((function(){r&&r(c)})).catch((function(e){o&&o(e)}))},complete:function(e){r&&r(e.key)}})}))}return s}}},D=O,Y=(n("6b54"),{install:function(e,t){console.log(t),e.MimcInstance=e.prototype.$mimcInstance={user:null,robot:null,platform:5,fetchMIMCTokenResult:null,_receiveP2PMsgCallback:null,_statusChangeCallback:null,_serverAckCallback:null,_disconnectCallback:null,init:function(e,t){this.platform=e.platform,this.fetchMIMCToken(e,t)},getLocalCacheUser:function(){var e=localStorage.getItem("user");return e?JSON.parse(e):null},fetchMIMCToken:function(e,t){var n=this;y.a.post("/public/register",e).then((function(e){n.fetchMIMCTokenResult=e.data.data.token,localStorage.setItem("user",JSON.stringify(e.data.data.user)),localStorage.setItem("Token",e.data.data.user.token),console.log("MIMC初始化成功"),n.getRobot((function(){t&&t(e.data.data.user)}))})).catch((function(e){t&&t(null),console.log(e)}))},getRobot:function(e){var t=this;y.a.get("/public/robot/"+this.platform).then((function(n){t.robot=n.data.data,e&&e()})).catch((function(e){console.log("mimc初始化失败,请刷新重试",e)}))},pushMessage:function(e){var t=this;y.a.post("/public/message/push",{msgType:"NORMAL_MSG",payload:e}).then((function(n){console.log(n.data),200!=n.data["code"]&&setTimeout((function(){return t.pushMessage(e)}),300)})).catch((function(){setTimeout((function(){return t.pushMessage(e)}),300)}))},login:function(e){var t=this;try{if(this.user)return;var n=this.fetchMIMCTokenResult;this.user=new MIMCUser(n.data.appId,n.data.appAccount,"666"),this.user.registerP2PMsgHandler((function(e){var n=JSON.parse(window.Base64.decode(e.getPayload()));t._receiveP2PMsgCallback&&t._receiveP2PMsgCallback(n)})),this.user.registerFetchToken((function(){return n})),this.user.registerStatusChange((function(e,n,a,r){t._statusChangeCallback&&t._statusChangeCallback(e,n,a,r)})),this.user.registerServerAckHandler((function(e,n,a,r){t._serverAckCallback&&t._serverAckCallback(e,n,a,r)})),this.user.registerDisconnHandler((function(){t._disconnectCallback&&t._disconnectCallback()})),this.user.login(),window.mimcInstance=this,e&&e(),console.log("MIMC登录成功")}catch(a){console.log("MIMC登录失败"),setTimeout((function(){t.login()}),1e3)}},logout:function(){this.user&&(this.user.logout(),this.user=null)},addEventListener:function(e,t){switch(e){case"receiveP2PMsg":this._receiveP2PMsgCallback=t;break;case"statusChange":this._statusChangeCallback=t;break;case"serverAck":this._serverAckCallback=t;break;case"disconnect":this._disconnectCallback=t;break}},sendMessage:function(e,t){var n=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.user){var r={from_account:parseInt(this.fetchMIMCTokenResult.data.appAccount),to_account:parseInt(t),biz_type:e,version:"0",timestamp:parseInt(((new Date).getTime()+" ").substr(0,10)),key:(new Date).getTime(),read:0,platform:this.platform,transfer_account:0,payload:a+""},o=window.Base64.encode(JSON.stringify(r));return"contacts"!=e&&"pong"!=e&&"welcome"!=e&&"handshake"!=e&&"search_knowledge"!=e&&this.pushMessage(window.Base64.encode(o)),setTimeout((function(){n.user.sendMessage(t.toString(),o)}),150),r}Object(A["Toast"])({message:"服务异常,请刷新重试!"})},createLocalMessage:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r={from_account:parseInt(this.fetchMIMCTokenResult.data.appAccount),to_account:parseInt(t),biz_type:e,version:"0",platform:this.platform,timestamp:parseInt(((new Date).getTime()+" ").substr(0,10)),key:(new Date).getTime(),read:0,transfer_account:parseInt(a),payload:n+""};return r}}}}),P=Y,$={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY年MM月DD日",LLL:"YYYY年MM月DD日Ah点mm分",LLLL:"YYYY年MM月DD日ddddAh点mm分",l:"YYYY-M-D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},week:{dow:1,doy:4}},z=n("c1df");z.locale("zh-cn",$),y.a.defaults.baseURL="/api",y.a.interceptors.request.use((function(e){var t=localStorage.getItem("Token")||"";return e.headers=Object.assign({},{Token:t},e.headers),e}),(function(e){return console.log(e),Promise.reject(e)}));var H={clickToCloseNonZoomable:!1,fullscreenEl:!1};a["default"].use(b.a,H),a["default"].use(D),a["default"].use(P),a["default"].use(L.a),a["default"].config.productionTip=!1,new a["default"]({router:k,store:S,render:function(e){return e(m)}}).$mount("#app")},"7faf":function(e,t,n){"use strict";var a=n("8fba"),r=n.n(a);r.a},"8fba":function(e,t,n){}});
//# sourceMappingURL=app.0aa8e568.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./src/App.vue?46e5","webpack:///src/App.vue","webpack:///./src/App.vue?2e55","webpack:///./src/App.vue?bff9","webpack:///./src/router.js","webpack:///./src/store/actions.js","webpack:///./src/store/mutations.js","webpack:///./src/store/getters.js","webpack:///./src/store/state.js","webpack:///./src/store/index.js","webpack:///./plugins/help.js","webpack:///./plugins/mimc.js","webpack:///./resource/moment_locale.js","webpack:///./src/main.js","webpack:///./src/App.vue?2c4a"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","installedCssChunks","jsonpScriptSrc","p","exports","module","l","e","promises","cssChunks","Promise","resolve","reject","href","fullhref","existingLinkTags","document","getElementsByTagName","tag","dataHref","getAttribute","rel","existingStyleTags","linkTag","createElement","type","onload","onerror","event","request","target","src","err","Error","code","parentNode","removeChild","head","appendChild","then","installedChunkData","promise","onScriptComplete","script","charset","timeout","nc","setAttribute","error","clearTimeout","chunk","errorType","realSrc","message","name","undefined","setTimeout","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","console","jsonpArray","window","oldJsonpFunction","slice","map","webpackContext","req","id","webpackContextResolve","keys","_vm","this","_h","$createElement","_c","_self","staticClass","class","isMobile","attrs","_e","staticRenderFns","computed","created","getLocal","onCheckIsOutSession","methods","runApp","localStorage","clear","$mimcInstance","init","handelUrl","isShowHeader","query","$route","urlQuery","queryToJson","getItem","assign","h","u","userAccount","parseInt","platform","uid","isArtificial","artificialAccount","a","robotAccount","isArtificialString","artificialAccountString","$store","commit","str","substr","split","mapData","temArr","dispatch","state","AmapAPPKey","upLastActivity","user","setItem","Date","now","artificialTime","component","Vue","use","Router","router","base","process","routes","path","redirect","onGetMessages","context","params","pageSize","axios","post","timestamp","page_size","response","newMessage","messages","list","isLoadMorEnd","oldMsg","concat","callback","catch","log","onGetLocal","APPKey","province","userLocal","city","onCleanRead","onUpdateLastActivity","onToggleWindow","put","onGetCompanyInfo","companyInfo","onGetUploadSecret","uploadToken","onGetWorkorderTypes","workorderTypes","onGetWorkorders","workorders","updateState","newObj","oldState","robotInfo","isLoadMorLoading","userInfo","isIOS","navigator","userAgent","match","isSafari","indexOf","isJudgeBigScreen","yes","rate","screen","height","width","limit","availHeight","isShowPageLoading","Vuex","Store","getters","mutations","actions","moment","require","Helps","options","$myMethod","$formatUnixDate","unix","format","$formatFromNowDate","$formatDate","$robotNickname","nickname","robots","$uploadFile","file","percent","success","fail","qiniuObservable","fileName","Math","random","getTime","lastIndexOf","fd","FormData","append","res","quality","noCompressIfLarger","maxWidth","qiniu","observable","dist","self","secret","mimeType","subscribe","next","formData","complete","MimcPlugin","MimcInstance","robot","fetchMIMCTokenResult","_receiveP2PMsgCallback","_statusChangeCallback","_serverAckCallback","_disconnectCallback","fetchMIMCToken","getLocalCacheUser","userString","JSON","parse","token","stringify","getRobot","pushMessage","payload","login","MIMCUser","appId","appAccount","registerP2PMsgHandler","msg","Base64","decode","getPayload","registerFetchToken","registerStatusChange","bindResult","errType","errReason","errDesc","registerServerAckHandler","packetId","sequence","timeStamp","errMsg","registerDisconnHandler","mimcInstance","logout","addEventListener","sendMessage","toAccount","messageJson","jsonBase64Msg","encode","toString","Toast","createLocalMessage","transferAccount","months","monthsShort","weekdays","weekdaysShort","weekdaysMin","longDateFormat","LT","LTS","L","LL","LLL","LLLL","ll","lll","llll","meridiemParse","meridiemHour","hour","meridiem","minute","hm","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","dayOfMonthOrdinalParse","ordinal","number","period","relativeTime","future","past","ss","mm","hh","dd","M","MM","y","yy","week","dow","doy","locale","momentLocal","defaults","baseURL","interceptors","config","headers","clickToCloseNonZoomable","fullscreenEl","preview","MintUI","productionTip","store","render","App","$mount"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C,MAAMO,EAASC,OACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAGnBC,EAAqB,CACxB,IAAO,GAMJjB,EAAkB,CACrB,IAAO,GAGJK,EAAkB,GAGtB,SAASa,EAA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,CACjC,MAAS0J,GACRyF,EAAOC,SACHD,KACN,SAAU5T,GAGX,OADAiC,QAAQgG,IAAIjI,GACLtC,QAAQE,OAAOoC,MAGxB,IAAIgL,EAAQ,CACV8I,yBAAyB,EACzBC,cAAa,GAEfxN,aAAIC,IAAIwN,IAAShJ,GACjBzE,aAAIC,IAAIuE,GACRxE,aAAIC,IAAI8G,GACR/G,aAAIC,IAAIyN,KACR1N,aAAIqN,OAAOM,eAAgB,EAC3B,IAAI3N,aAAI,CACNG,SACAyN,QACAC,OAAQ,SAAA1P,GAAC,OAAIA,EAAE2P,MACdC,OAAO,S,oCC5CV,yBAAqf,EAAG,G","file":"js/app.0aa8e568.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded CSS chunks\n \tvar installedCssChunks = {\n \t\t\"app\": 0\n \t}\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"js/\" + ({}[chunkId]||chunkId) + \".\" + {\"chunk-5e6009ff\":\"d7088d94\",\"chunk-612d9b40\":\"13a3a9bb\",\"chunk-6c9c88aa\":\"d765f1fb\",\"chunk-c5fee4c4\":\"1073caa4\"}[chunkId] + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// mini-css-extract-plugin CSS loading\n \t\tvar cssChunks = {\"chunk-5e6009ff\":1,\"chunk-612d9b40\":1,\"chunk-6c9c88aa\":1,\"chunk-c5fee4c4\":1};\n \t\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n \t\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n \t\t\tpromises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {\n \t\t\t\tvar href = \"css/\" + ({}[chunkId]||chunkId) + \".\" + {\"chunk-5e6009ff\":\"86cb9867\",\"chunk-612d9b40\":\"3daa63d4\",\"chunk-6c9c88aa\":\"4206eba5\",\"chunk-c5fee4c4\":\"d04a186e\"}[chunkId] + \".css\";\n \t\t\t\tvar fullhref = __webpack_require__.p + href;\n \t\t\t\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n \t\t\t\tfor(var i = 0; i < existingLinkTags.length; i++) {\n \t\t\t\t\tvar tag = existingLinkTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n \t\t\t\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return resolve();\n \t\t\t\t}\n \t\t\t\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n \t\t\t\tfor(var i = 0; i < existingStyleTags.length; i++) {\n \t\t\t\t\tvar tag = existingStyleTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\");\n \t\t\t\t\tif(dataHref === href || dataHref === fullhref) return resolve();\n \t\t\t\t}\n \t\t\t\tvar linkTag = document.createElement(\"link\");\n \t\t\t\tlinkTag.rel = \"stylesheet\";\n \t\t\t\tlinkTag.type = \"text/css\";\n \t\t\t\tlinkTag.onload = resolve;\n \t\t\t\tlinkTag.onerror = function(event) {\n \t\t\t\t\tvar request = event && event.target && event.target.src || fullhref;\n \t\t\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + request + \")\");\n \t\t\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n \t\t\t\t\terr.request = request;\n \t\t\t\t\tdelete installedCssChunks[chunkId]\n \t\t\t\t\tlinkTag.parentNode.removeChild(linkTag)\n \t\t\t\t\treject(err);\n \t\t\t\t};\n \t\t\t\tlinkTag.href = fullhref;\n\n \t\t\t\tvar head = document.getElementsByTagName(\"head\")[0];\n \t\t\t\thead.appendChild(linkTag);\n \t\t\t}).then(function() {\n \t\t\t\tinstalledCssChunks[chunkId] = 0;\n \t\t\t}));\n \t\t}\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","var map = {\n\t\"./af\": \"2bfb\",\n\t\"./af.js\": \"2bfb\",\n\t\"./ar\": \"8e73\",\n\t\"./ar-dz\": \"a356\",\n\t\"./ar-dz.js\": \"a356\",\n\t\"./ar-kw\": \"423e\",\n\t\"./ar-kw.js\": \"423e\",\n\t\"./ar-ly\": \"1cfd\",\n\t\"./ar-ly.js\": \"1cfd\",\n\t\"./ar-ma\": \"0a84\",\n\t\"./ar-ma.js\": \"0a84\",\n\t\"./ar-sa\": \"8230\",\n\t\"./ar-sa.js\": \"8230\",\n\t\"./ar-tn\": \"6d83\",\n\t\"./ar-tn.js\": \"6d83\",\n\t\"./ar.js\": \"8e73\",\n\t\"./az\": \"485c\",\n\t\"./az.js\": \"485c\",\n\t\"./be\": \"1fc1\",\n\t\"./be.js\": \"1fc1\",\n\t\"./bg\": \"84aa\",\n\t\"./bg.js\": \"84aa\",\n\t\"./bm\": \"a7fa\",\n\t\"./bm.js\": \"a7fa\",\n\t\"./bn\": \"9043\",\n\t\"./bn.js\": \"9043\",\n\t\"./bo\": \"d26a\",\n\t\"./bo.js\": \"d26a\",\n\t\"./br\": \"6887\",\n\t\"./br.js\": \"6887\",\n\t\"./bs\": \"2554\",\n\t\"./bs.js\": \"2554\",\n\t\"./ca\": \"d716\",\n\t\"./ca.js\": \"d716\",\n\t\"./cs\": \"3c0d\",\n\t\"./cs.js\": \"3c0d\",\n\t\"./cv\": \"03ec\",\n\t\"./cv.js\": \"03ec\",\n\t\"./cy\": \"9797\",\n\t\"./cy.js\": \"9797\",\n\t\"./da\": \"0f14\",\n\t\"./da.js\": \"0f14\",\n\t\"./de\": \"b469\",\n\t\"./de-at\": \"b3eb\",\n\t\"./de-at.js\": \"b3eb\",\n\t\"./de-ch\": \"bb71\",\n\t\"./de-ch.js\": \"bb71\",\n\t\"./de.js\": \"b469\",\n\t\"./dv\": \"598a\",\n\t\"./dv.js\": \"598a\",\n\t\"./el\": \"8d47\",\n\t\"./el.js\": \"8d47\",\n\t\"./en-SG\": \"cdab\",\n\t\"./en-SG.js\": \"cdab\",\n\t\"./en-au\": \"0e6b\",\n\t\"./en-au.js\": \"0e6b\",\n\t\"./en-ca\": \"3886\",\n\t\"./en-ca.js\": \"3886\",\n\t\"./en-gb\": \"39a6\",\n\t\"./en-gb.js\": \"39a6\",\n\t\"./en-ie\": \"e1d3\",\n\t\"./en-ie.js\": \"e1d3\",\n\t\"./en-il\": \"7333\",\n\t\"./en-il.js\": \"7333\",\n\t\"./en-nz\": \"6f50\",\n\t\"./en-nz.js\": \"6f50\",\n\t\"./eo\": \"65db\",\n\t\"./eo.js\": \"65db\",\n\t\"./es\": \"898b\",\n\t\"./es-do\": \"0a3c\",\n\t\"./es-do.js\": \"0a3c\",\n\t\"./es-us\": \"55c9\",\n\t\"./es-us.js\": \"55c9\",\n\t\"./es.js\": \"898b\",\n\t\"./et\": \"ec18\",\n\t\"./et.js\": \"ec18\",\n\t\"./eu\": \"0ff2\",\n\t\"./eu.js\": \"0ff2\",\n\t\"./fa\": \"8df4\",\n\t\"./fa.js\": \"8df4\",\n\t\"./fi\": \"81e9\",\n\t\"./fi.js\": \"81e9\",\n\t\"./fo\": \"0721\",\n\t\"./fo.js\": \"0721\",\n\t\"./fr\": \"9f26\",\n\t\"./fr-ca\": \"d9f8\",\n\t\"./fr-ca.js\": \"d9f8\",\n\t\"./fr-ch\": \"0e49\",\n\t\"./fr-ch.js\": \"0e49\",\n\t\"./fr.js\": \"9f26\",\n\t\"./fy\": \"7118\",\n\t\"./fy.js\": \"7118\",\n\t\"./ga\": \"5120\",\n\t\"./ga.js\": \"5120\",\n\t\"./gd\": \"f6b4\",\n\t\"./gd.js\": \"f6b4\",\n\t\"./gl\": \"8840\",\n\t\"./gl.js\": \"8840\",\n\t\"./gom-latn\": \"0caa\",\n\t\"./gom-latn.js\": \"0caa\",\n\t\"./gu\": \"e0c5\",\n\t\"./gu.js\": \"e0c5\",\n\t\"./he\": \"c7aa\",\n\t\"./he.js\": \"c7aa\",\n\t\"./hi\": \"dc4d\",\n\t\"./hi.js\": \"dc4d\",\n\t\"./hr\": \"4ba9\",\n\t\"./hr.js\": \"4ba9\",\n\t\"./hu\": \"5b14\",\n\t\"./hu.js\": \"5b14\",\n\t\"./hy-am\": \"d6b6\",\n\t\"./hy-am.js\": \"d6b6\",\n\t\"./id\": \"5038\",\n\t\"./id.js\": \"5038\",\n\t\"./is\": \"0558\",\n\t\"./is.js\": \"0558\",\n\t\"./it\": \"6e98\",\n\t\"./it-ch\": \"6f12\",\n\t\"./it-ch.js\": \"6f12\",\n\t\"./it.js\": \"6e98\",\n\t\"./ja\": \"079e\",\n\t\"./ja.js\": \"079e\",\n\t\"./jv\": \"b540\",\n\t\"./jv.js\": \"b540\",\n\t\"./ka\": \"201b\",\n\t\"./ka.js\": \"201b\",\n\t\"./kk\": \"6d79\",\n\t\"./kk.js\": \"6d79\",\n\t\"./km\": \"e81d\",\n\t\"./km.js\": \"e81d\",\n\t\"./kn\": \"3e92\",\n\t\"./kn.js\": \"3e92\",\n\t\"./ko\": \"22f8\",\n\t\"./ko.js\": \"22f8\",\n\t\"./ku\": \"2421\",\n\t\"./ku.js\": \"2421\",\n\t\"./ky\": \"9609\",\n\t\"./ky.js\": \"9609\",\n\t\"./lb\": \"440c\",\n\t\"./lb.js\": \"440c\",\n\t\"./lo\": \"b29d\",\n\t\"./lo.js\": \"b29d\",\n\t\"./lt\": \"26f9\",\n\t\"./lt.js\": \"26f9\",\n\t\"./lv\": \"b97c\",\n\t\"./lv.js\": \"b97c\",\n\t\"./me\": \"293c\",\n\t\"./me.js\": \"293c\",\n\t\"./mi\": \"688b\",\n\t\"./mi.js\": \"688b\",\n\t\"./mk\": \"6909\",\n\t\"./mk.js\": \"6909\",\n\t\"./ml\": \"02fb\",\n\t\"./ml.js\": \"02fb\",\n\t\"./mn\": \"958b\",\n\t\"./mn.js\": \"958b\",\n\t\"./mr\": \"39bd\",\n\t\"./mr.js\": \"39bd\",\n\t\"./ms\": \"ebe4\",\n\t\"./ms-my\": \"6403\",\n\t\"./ms-my.js\": \"6403\",\n\t\"./ms.js\": \"ebe4\",\n\t\"./mt\": \"1b45\",\n\t\"./mt.js\": \"1b45\",\n\t\"./my\": \"8689\",\n\t\"./my.js\": \"8689\",\n\t\"./nb\": \"6ce3\",\n\t\"./nb.js\": \"6ce3\",\n\t\"./ne\": \"3a39\",\n\t\"./ne.js\": \"3a39\",\n\t\"./nl\": \"facd\",\n\t\"./nl-be\": \"db29\",\n\t\"./nl-be.js\": \"db29\",\n\t\"./nl.js\": \"facd\",\n\t\"./nn\": \"b84c\",\n\t\"./nn.js\": \"b84c\",\n\t\"./pa-in\": \"f3ff\",\n\t\"./pa-in.js\": \"f3ff\",\n\t\"./pl\": \"8d57\",\n\t\"./pl.js\": \"8d57\",\n\t\"./pt\": \"f260\",\n\t\"./pt-br\": \"d2d4\",\n\t\"./pt-br.js\": \"d2d4\",\n\t\"./pt.js\": \"f260\",\n\t\"./ro\": \"972c\",\n\t\"./ro.js\": \"972c\",\n\t\"./ru\": \"957c\",\n\t\"./ru.js\": \"957c\",\n\t\"./sd\": \"6784\",\n\t\"./sd.js\": \"6784\",\n\t\"./se\": \"ffff\",\n\t\"./se.js\": \"ffff\",\n\t\"./si\": \"eda5\",\n\t\"./si.js\": \"eda5\",\n\t\"./sk\": \"7be6\",\n\t\"./sk.js\": \"7be6\",\n\t\"./sl\": \"8155\",\n\t\"./sl.js\": \"8155\",\n\t\"./sq\": \"c8f3\",\n\t\"./sq.js\": \"c8f3\",\n\t\"./sr\": \"cf1e\",\n\t\"./sr-cyrl\": \"13e9\",\n\t\"./sr-cyrl.js\": \"13e9\",\n\t\"./sr.js\": \"cf1e\",\n\t\"./ss\": \"52bd\",\n\t\"./ss.js\": \"52bd\",\n\t\"./sv\": \"5fbd\",\n\t\"./sv.js\": \"5fbd\",\n\t\"./sw\": \"74dc\",\n\t\"./sw.js\": \"74dc\",\n\t\"./ta\": \"3de5\",\n\t\"./ta.js\": \"3de5\",\n\t\"./te\": \"5cbb\",\n\t\"./te.js\": \"5cbb\",\n\t\"./tet\": \"576c\",\n\t\"./tet.js\": \"576c\",\n\t\"./tg\": \"3b1b\",\n\t\"./tg.js\": \"3b1b\",\n\t\"./th\": \"10e8\",\n\t\"./th.js\": \"10e8\",\n\t\"./tl-ph\": \"0f38\",\n\t\"./tl-ph.js\": \"0f38\",\n\t\"./tlh\": \"cf75\",\n\t\"./tlh.js\": \"cf75\",\n\t\"./tr\": \"0e81\",\n\t\"./tr.js\": \"0e81\",\n\t\"./tzl\": \"cf51\",\n\t\"./tzl.js\": \"cf51\",\n\t\"./tzm\": \"c109\",\n\t\"./tzm-latn\": \"b53d\",\n\t\"./tzm-latn.js\": \"b53d\",\n\t\"./tzm.js\": \"c109\",\n\t\"./ug-cn\": \"6117\",\n\t\"./ug-cn.js\": \"6117\",\n\t\"./uk\": \"ada2\",\n\t\"./uk.js\": \"ada2\",\n\t\"./ur\": \"5294\",\n\t\"./ur.js\": \"5294\",\n\t\"./uz\": \"2e8c\",\n\t\"./uz-latn\": \"010e\",\n\t\"./uz-latn.js\": \"010e\",\n\t\"./uz.js\": \"2e8c\",\n\t\"./vi\": \"2921\",\n\t\"./vi.js\": \"2921\",\n\t\"./x-pseudo\": \"fd7e\",\n\t\"./x-pseudo.js\": \"fd7e\",\n\t\"./yo\": \"7f33\",\n\t\"./yo.js\": \"7f33\",\n\t\"./zh-cn\": \"5c3a\",\n\t\"./zh-cn.js\": \"5c3a\",\n\t\"./zh-hk\": \"49ab\",\n\t\"./zh-hk.js\": \"49ab\",\n\t\"./zh-tw\": \"90ea\",\n\t\"./zh-tw.js\": \"90ea\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"4678\";","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.isShowPageLoading)?_c('div',{staticClass:\"mini-im-loading\",class:{'pc-mini-im-loading': !_vm.isMobile}},[_c('mt-spinner',{attrs:{\"type\":\"triple-bounce\",\"color\":\"#26a2ff\"}})],1):_vm._e(),_c('router-view')],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div>\n <div\n class=\"mini-im-loading\"\n :class=\"{'pc-mini-im-loading': !isMobile}\"\n v-if=\"isShowPageLoading\"\n >\n <mt-spinner type=\"triple-bounce\" color=\"#26a2ff\"></mt-spinner>\n </div>\n <router-view />\n </div>\n</template>\n\n<script>\nimport { mapGetters } from \"vuex\";\nexport default {\n name: \"app\",\n data() {\n return {};\n },\n computed: {\n ...mapGetters([\n \"isShowPageLoading\",\n \"userAccount\",\n \"isArtificial\",\n \"isMobile\",\n \"artificialAccount\",\n \"robotAccount\",\n \"platform\",\n \"userLocal\",\n \"uid\",\n \"uid\",\n ])\n },\n created() {\n this.getLocal();\n setTimeout(() => {\n this.handelUrl()\n this.runApp()\n }, 500);\n // 判断是否被踢出对话\n this.onCheckIsOutSession();\n },\n methods: {\n runApp() {\n const user = this.$mimcInstance.getLocalCacheUser();\n if (\n user &&\n this.userAccount != null &&\n this.userAccount != user.id &&\n this.userAccount != 0\n ) {\n localStorage.clear();\n }\n this.$mimcInstance.init(\n {\n type: 0, // 默认0\n address: this.userLocal,\n uid: this.uid || 0, // 预留字段扩展自己平台业务\n platform: this.platform, // 渠道(平台)\n account_id: this.userAccount || 0 // 用户ID\n // 初始化完成这里返回一个user\n },\n user => {\n\n // 上报活动时间\n this.upLastActivity();\n\n // 获取公司信息\n this.$store.dispatch(\"onGetCompanyInfo\");\n\n // 获取上传配置信息\n this.$store.dispatch(\"onGetUploadSecret\");\n\n // 获取工单类型\n this.$store.dispatch(\"onGetWorkorderTypes\");\n\n // 获取工单列表\n this.$store.dispatch(\"onGetWorkorders\");\n\n // 重试\n if (!user) {\n setTimeout(() => this.runApp(), 1000);\n return;\n }\n\n // user\n this.$store.commit(\"updateState\", {\n userAccount: user.id,\n userInfo: user\n });\n\n // robot\n var robot = this.$mimcInstance.robot;\n localStorage.setItem(\"robot_\" + robot.id, JSON.stringify(robot));\n this.$store.commit(\"updateState\", {\n robotAccount: robot.id,\n robotInfo: robot\n });\n\n // 登录mimc\n this.$mimcInstance.login();\n\n // 发送一条握手消息给机器人\n var sentHandshake =() =>{\n if (this.$mimcInstance.user == null || !this.$mimcInstance.user.isLogin()) {\n setTimeout(() => sentHandshake(), 200);\n return\n }\n if (!this.artificialAccount) {\n console.log(\"握手消息\");\n this.$mimcInstance.sendMessage(\n \"handshake\",\n this.robotAccount,\n \"\"\n );\n }\n }\n sentHandshake()\n\n\n }\n );\n },\n // Handelurl\n handelUrl() {\n // url query 介绍\n // h == header 0 不显示 1显示 默认值显示,PC端不显示\n // m == mobile 0 不是移动端 1是移动端\n // p == platform 平台ID(渠道)\n // r == robot 0 当前为为客服 1机器人(对应的账号为a)\n // a == account 当前提供对话服务的账号,即客服账号,或机器人\n // u == userAccount 会话用户账号\n // uid == userId 业务平台的ID\n // c = 1 清除本地缓存\n var isShowHeader,\n isMobile,\n userAccount,\n uid,\n isArtificial,\n artificialAccount,\n robotAccount,\n platform;\n var query = this.$route.query;\n if (query && query.c) localStorage.clear();\n // 获取本地缓存\n var urlQuery = this.queryToJson(localStorage.getItem(\"urlQuery\"));\n if (urlQuery) {\n query = Object.assign({}, urlQuery, query);\n }\n if (query) {\n if (query.h == \"0\") isShowHeader = false;\n if (query.m == \"0\") {\n isMobile = false;\n isShowHeader = false;\n }\n if (query.u) userAccount = parseInt(query.u);\n if (query.p) platform = parseInt(query.p);\n if (query.uid) uid = parseInt(query.uid);\n if (query.r == \"0\") {\n isArtificial = true;\n artificialAccount = parseInt(query.a);\n } else {\n robotAccount = parseInt(query.a);\n }\n }\n var isArtificialString = localStorage.getItem(\"isArtificial\");\n var artificialAccountString = localStorage.getItem(\"artificialAccount\");\n if (isArtificialString == \"true\") {\n isArtificial = true;\n artificialAccount = parseInt(artificialAccountString);\n }\n this.$store.commit(\"updateState\", {\n isShowHeader,\n isMobile,\n userAccount,\n uid,\n isArtificial,\n artificialAccount,\n robotAccount,\n platform\n });\n },\n // query 转json\n queryToJson(str) {\n if (!str || str == \"\") return null;\n var query = str.substr(1, str.length).split(\"&\");\n if (!query) return null;\n var mapData = {};\n for (let i = 0; i < query.length; i++) {\n var temArr = query[i].split(\"=\");\n mapData[temArr[0]] = temArr[1];\n }\n return mapData;\n },\n // 根据IP获取用户地理位置\n getLocal() {\n this.$store.dispatch(\"onGetLocal\", this.$store.state.AmapAPPKey);\n },\n // 上报最后活动时间\n upLastActivity() {\n this.onCheckIsOutSession();\n const user = this.$mimcInstance.getLocalCacheUser();\n if (user) this.$store.dispatch(\"onUpdateLastActivity\");\n if (this.isArtificial) {\n localStorage.setItem(\"artificialTime\", Date.now());\n }\n setTimeout(() => this.upLastActivity(), 1000 * 60);\n },\n // 判断是否被踢出对话\n onCheckIsOutSession() {\n var artificialTime = localStorage.getItem(\"artificialTime\");\n if (artificialTime) {\n artificialTime = parseInt(artificialTime);\n if (Date.now() > artificialTime + 60 * 1000 * 10) {\n this.$store.commit(\"updateState\", {\n isArtificial: false,\n artificialAccount: null\n });\n }\n }\n },\n }\n};\n</script>\n\n<style lang=\"stylus\">\nbody {\n min-width: 240px;\n overflow: hidden;\n height: 100vh;\n background-color: #f3f3f3;\n}\n\n.mint-header.is-fixed {\n height: 50px !important;\n background: -webkit-linear-gradient(to right, #26a2ff, #736cde);\n background: -o-linear-gradient(to right, #26a2ff, #736cde);\n background: -moz-linear-gradient(to right, #26a2ff, #736cde);\n background: linear-gradient(to right, #26a2ff, #736cde);\n\n .mint-header-title {\n font-size: 15px;\n }\n}\n\n.mint-header, .mint-tabbar {\n min-width: 240px;\n z-index: 999999999 !important;\n}\n\n.mint-header .is-right {\n img {\n width: 25px;\n }\n}\n\n.mint-header .mint-button .mintui {\n font-size: 23px !important;\n}\n\n.mini-im-loading {\n display: flex;\n width: 100%;\n position: fixed;\n height: 100vh;\n top: 0;\n left: 0;\n z-index: 9;\n right: 0;\n background-color: #fff !important;\n margin: auto;\n align-items: center;\n justify-content: center;\n\n &.pc-mini-im-loading {\n width: 360px !important;\n height: 360px !important;\n top: -48px;\n bottom: 0;\n margin: auto !important;\n }\n}\n.workorder-create-picker .picker-item{\n font-size 15px\n}\n</style>\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=8724d2a4&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=stylus&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport Router from 'vue-router'\n\nVue.use(Router)\nconst router = new Router({\n base: process.env.BASE_URL,\n routes: [\n {\n path: '/',\n redirect: '/index'\n },\n {\n path: '/index',\n name: 'index',\n component: () => import('./views/kefu.vue')\n },\n {\n path: '/workorder',\n name: 'workorder',\n component: () => import('./views/workorder.vue')\n },\n {\n path: '/workorder/create',\n name: 'workorder_create',\n component: () => import('./views/workorder_create.vue')\n },\n {\n path: '/workorder/detail/:id',\n name: 'workorder_detail',\n component: () => import('./views/workorder_detail.vue')\n },\n ]\n})\n\nexport default router\n","import axios from \"axios\";\nexport default {\n // 获取消息列表\n // params.timestamp\n // params.callback\n // params.oldMsg old msgs\n onGetMessages(context, params) {\n const pageSize = 20;\n axios\n .post(\"/public/messages\", {\n timestamp: params.timestamp,\n page_size: pageSize\n })\n .then(response => {\n let newMessage = [];\n let messages = response.data.data.list || [];\n if (messages.length < pageSize || messages.length == 0) {\n context.commit('updateState', { isLoadMorEnd: true })\n }\n if (params.oldMsg.length == 0 && messages.length > 0) {\n newMessage = response.data.data.list\n } else if (messages.length > 0) {\n newMessage = messages.concat(params.oldMsg);\n }else{\n newMessage = params.oldMsg\n }\n context.commit('updateState', { messages: newMessage })\n if (params.callback) params.callback()\n })\n .catch(error => {\n console.log(error);\n });\n },\n // 获取用户位置\n // APPKey 高德地图web应用key\n onGetLocal(context, APPKey) {\n axios\n .get(\"https://restapi.amap.com/v3/ip?key=\" + APPKey)\n .then(response => {\n if (response.data.province) {\n context.commit('updateState', { userLocal: response.data.province + response.data.city })\n }\n })\n .catch(error => {\n console.error(error);\n });\n },\n // 清除未读消息\n onCleanRead() {\n axios.get(\"/public/clean_read/\");\n },\n // 上报最后活动时间\n onUpdateLastActivity() {\n axios.get(\"/public/activity/\");\n },\n // 用户是否在当前聊天页面\n onToggleWindow(context, window) {\n axios.put(\"/public/window/\", { window });\n },\n // 用户是否在当前聊天页面\n onGetCompanyInfo(context) {\n axios\n .get(\"/public/company\")\n .then(response => {\n context.commit('updateState', { companyInfo: response.data.data })\n })\n .catch(error => {\n console.error(error);\n });\n },\n // 获取上传配置\n onGetUploadSecret(context){\n axios.get(\"/public/secret\").then(response => {\n context.commit('updateState', { uploadToken: response.data.data })\n });\n },\n // 获取工单类型\n onGetWorkorderTypes(context){\n axios.get(\"/public/workorder/types\").then(response => {\n context.commit('updateState', { workorderTypes: response.data.data })\n });\n },\n // 获取工单列表\n onGetWorkorders(context){\n axios.get(\"/public/workorders\").then(response => {\n context.commit('updateState', { workorders: response.data.data })\n });\n }\n}","export default {\n updateState(state, newObj){\n var oldState = state\n for (var i in newObj) {\n if(newObj[i] == undefined) continue\n oldState[i] = newObj[i]\n }\n\n state = oldState\n\n }\n}","export default {\n platform(state) {\n return state.platform;\n },\n isArtificial(state) {\n return state.isArtificial;\n },\n isShowHeader(state) {\n return state.isShowHeader;\n },\n isMobile(state) {\n return state.isMobile;\n },\n uid(state) {\n return state.uid;\n },\n userAccount(state) {\n return state.userAccount;\n },\n artificialAccount(state) {\n return state.artificialAccount;\n },\n robotInfo(state) {\n return state.robotInfo\n },\n robotAccount(state) {\n return state.robotAccount\n },\n isLoadMorEnd(state) {\n return state.isLoadMorEnd\n },\n messages(state) {\n return state.messages || []\n },\n userLocal(state) {\n return state.userLocal\n },\n isLoadMorLoading(state) {\n return state.isLoadMorLoading\n },\n userInfo(state) {\n return state.userInfo\n },\n companyInfo(state) {\n return state.companyInfo\n },\n uploadToken(state) {\n return state.uploadToken\n },\n isIOS() {\n return !!navigator.userAgent.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/);\n },\n isSafari() {\n return (\n navigator.userAgent.indexOf(\"Safari\") > -1 &&\n navigator.userAgent.indexOf(\"Chrome\") < 1\n );\n },\n isJudgeBigScreen() {\n let yes = false;\n const rate = window.screen.height / window.screen.width;\n let limit = window.screen.height == window.screen.availHeight ? 1.8 : 1.65;\n if (rate > limit) yes = true;\n return yes;\n },\n isShowPageLoading(state){\n return state.isShowPageLoading\n },\n workorders(state){\n return state.workorders\n },\n workorderTypes(state){\n return state.workorderTypes\n }\n}","export default {\n platform: 5, // 平台(渠道)\n isShowPageLoading: false, // page loading\n isShowHeader: true, // 是否显示header\n isMobile: true, // 是否是移动端\n isArtificial: false, // 是否是人工服务\n uid: 0, // 业务平台的ID\n userAccount: 0, // 用户账号\n artificialAccount: null, // 客服账号ID\n robotInfo: null, // 机器人信息\n robotAccount: null, // 机器人账号ID\n messages: [], // 消息列表\n isLoadMorEnd: false, // 是否已经到末尾\n userLocal: \"\", // 用户地理位置\n AmapAPPKey: \"\", // 高德地图web appkey\n isLoadMorLoading: false, // 是否在加装更多消息loading\n userInfo: {}, // 用户信息\n companyInfo: null, // 公司信息\n uploadToken: null, // 上传token\n\n // workorder\n workorders: [], // 工单列表\n workorderTypes: [], // 工单类型列表\n \n}","import Vue from 'vue'\nimport Vuex from 'vuex'\nimport actions from './actions'\nimport mutations from './mutations'\nimport getters from './getters'\nimport state from './state'\nVue.use(Vuex)\nexport default new Vuex.Store({\n state: state,\n getters: getters,\n mutations: mutations,\n actions: actions\n})","var moment = require('moment');\nimport axios from \"axios\";\nimport * as qiniu from \"qiniu-js\";\n// eslint-disable-next-line no-undef\nvar Helps = {};\nHelps.install = function (Vue, options) {\n Vue.prototype.$myMethod = function () {\n console.log(options)\n }\n // 格式化日期\n Vue.prototype.$formatUnixDate = function (unix, format) {\n return moment(parseInt(unix + '000')).format(format)\n }\n // 格式化日期(相对日期)\n Vue.prototype.$formatFromNowDate = function (unix, format = \"YYYY-MM-DD HH:mm\") {\n if (moment().format(\"YYYYMMDD\") == moment(parseInt(unix + '000')).format(\"YYYYMMDD\")) {\n return \"今天 \" + moment(parseInt(unix + '000')).format(\"HH:mm\")\n }\n return moment(parseInt(unix + '000')).format(format)\n }\n // 格式化日期(相对日期)\n Vue.prototype.$formatDate = function (unix, format = \"YYYY-MM-DD HH:mm:ss\") {\n return moment(parseInt(unix + '000')).format(format)\n }\n Vue.prototype.$robotNickname = function (id) {\n var nickname\n var robots = this.$store.getters.robots\n for (let i = 0; i < robots.length; i++) {\n if (robots[i].id == id) {\n nickname = robots[i].nickname\n }\n }\n return nickname\n }\n\n // 上传文件\n Vue.prototype.$uploadFile = function ({ mode, file, percent, success, fail }) {\n var qiniuObservable = null;\n const fileName = parseInt(Math.random() * 10000 * new Date().getTime()) + file.name.substr(file.name.lastIndexOf(\".\"));\n // 系统内置\n if (mode == 1) {\n let fd = new FormData();\n fd.append(\"file\", file);\n fd.append(\"file_name\", fileName);\n axios\n .post(\"/public/upload\", fd)\n .then(res => {\n if (success) success(res.data.data);\n })\n .catch((e) => {\n if (fail) fail(e);\n });\n }\n // 七牛云\n else if (mode == 2) {\n let options = {\n quality: 0.92,\n noCompressIfLarger: true,\n maxWidth: 1500\n };\n qiniu.compressImage(file, options).then(data => {\n const observable = qiniu.upload(\n data.dist,\n fileName,\n self.uploadToken.secret,\n {},\n {\n mimeType: null\n }\n );\n qiniuObservable = observable.subscribe({\n next: function (res) {\n if (percent) percent(res)\n },\n error: function () {\n // 失败后再次使用FormData上传\n var formData = new FormData();\n formData.append(\"fileType\", \"image\");\n formData.append(\"fileName\", \"file\");\n formData.append(\"key\", fileName);\n formData.append(\"token\", self.uploadToken.secret);\n formData.append(\"file\", file);\n axios\n .post(\"https://upload.qiniup.com\", formData)\n .then(() => {\n if (success) success(fileName);\n })\n .catch((e) => {\n if (fail) fail(e);\n });\n },\n complete: function (res) {\n if (success) success(res.key);\n }\n });\n });\n }\n\n return qiniuObservable\n\n }\n\n\n}\nexport default Helps;","import axios from \"axios\";\nimport { Toast } from 'mint-ui';\nvar MimcPlugin = {};\nMimcPlugin.install = function (Vue, options) {\n\n console.log(options)\n\n // 获取单个平台数据\n Vue.MimcInstance = Vue.prototype.$mimcInstance = {\n user: null,\n robot: null,\n platform: 5,\n fetchMIMCTokenResult: null,\n _receiveP2PMsgCallback: null,\n _statusChangeCallback: null,\n _serverAckCallback: null,\n _disconnectCallback: null,\n // 初始化\n init(request, callback){\n this.platform = request.platform\n this.fetchMIMCToken(request, callback)\n },\n // 获取本地已经登录过的User\n getLocalCacheUser(){\n const userString = localStorage.getItem(\"user\")\n if(userString) return JSON.parse(userString)\n return null\n },\n // 获取token\n // request 登录参数\n // 登录回调 callback bool 是否成功\n fetchMIMCToken(request, callback){\n axios.post('/public/register', request)\n .then(response => {\n this.fetchMIMCTokenResult = response.data.data.token\n localStorage.setItem(\"user\", JSON.stringify(response.data.data.user))\n localStorage.setItem(\"Token\", response.data.data.user.token)\n console.log(\"MIMC初始化成功\")\n this.getRobot(()=>{\n if(callback) callback(response.data.data.user)\n })\n })\n .catch((error)=>{\n if(callback) callback(null)\n console.log(error)\n })\n },\n // 获取机器人\n getRobot(callback){\n axios.get('/public/robot/'+this.platform)\n .then(response => {\n this.robot = response.data.data\n if(callback)callback()\n }) \n .catch((error)=>{\n console.log(\"mimc初始化失败,请刷新重试\", error)\n })\n },\n // pushMessage\n pushMessage(payload){\n axios.post('/public/message/push', {\n \"msgType\": \"NORMAL_MSG\",\n \"payload\": payload\n })\n .then(response => {\n console.log(response.data)\n if(response.data['code'] != 200){\n setTimeout(()=> this.pushMessage(payload), 300)\n }\n })\n .catch(()=>{\n setTimeout(()=> this.pushMessage(payload), 300)\n })\n },\n // 登录\n login(callback){\n try{\n if(this.user) return\n var fetchMIMCTokenResult = this.fetchMIMCTokenResult\n // eslint-disable-next-line no-undef\n this.user = new MIMCUser(fetchMIMCTokenResult.data.appId, fetchMIMCTokenResult.data.appAccount, \"666\");\n this.user.registerP2PMsgHandler((message)=>{\n var msg = JSON.parse(window.Base64.decode(message.getPayload()));\n if(this._receiveP2PMsgCallback) this._receiveP2PMsgCallback(msg)\n });\n this.user.registerFetchToken(() => {\n return fetchMIMCTokenResult;\n });\n this.user.registerStatusChange((bindResult, errType, errReason, errDesc)=>{\n if(this._statusChangeCallback) this._statusChangeCallback(bindResult, errType, errReason, errDesc)\n });\n this.user.registerServerAckHandler((packetId, sequence, timeStamp, errMsg)=>{\n if(this._serverAckCallback) this._serverAckCallback(packetId, sequence, timeStamp, errMsg)\n });\n this.user.registerDisconnHandler(() => {\n if(this._disconnectCallback) this._disconnectCallback()\n });\n this.user.login();\n window.mimcInstance = this\n if(callback) callback()\n console.log(\"MIMC登录成功\")\n }catch(e){\n console.log(\"MIMC登录失败\")\n // 重新尝试\n setTimeout(()=>{\n this.login()\n }, 1000)\n }\n },\n // 退出\n logout(){\n if(this.user){\n this.user.logout()\n this.user = null\n }\n },\n // 注册监听器\n addEventListener(type, callback){\n switch(type){\n case \"receiveP2PMsg\":\n this._receiveP2PMsgCallback = callback\n break\n case \"statusChange\":\n this._statusChangeCallback = callback\n break\n case \"serverAck\":\n this._serverAckCallback = callback\n break\n case \"disconnect\":\n this._disconnectCallback = callback\n break\n }\n },\n // 发送消息\n sendMessage(type, toAccount, payload = \"\"){\n if(!this.user){\n Toast({\n message: \"服务异常,请刷新重试!\"\n })\n return\n }\n var messageJson = {\n \"from_account\": parseInt(this.fetchMIMCTokenResult.data.appAccount),\n \"to_account\": parseInt(toAccount),\n \"biz_type\": type,\n \"version\": \"0\",\n \"timestamp\": parseInt((new Date().getTime() + \" \").substr(0, 10)),\n \"key\": new Date().getTime(),\n \"read\": 0,\n \"platform\": this.platform,\n \"transfer_account\": 0,\n \"payload\": payload + ''\n }\n \n var jsonBase64Msg = window.Base64.encode(JSON.stringify(messageJson))\n \n // 过滤不入库\n if(!(type == \"contacts\" || type == \"pong\" || type == \"welcome\" || type == \"handshake\" || type == \"search_knowledge\")){\n // 发送给机器人中专入库\n // const intoMessageJson = {\n // \"biz_type\": \"into\",\n // \"payload\": jsonBase64Msg\n // }\n // const intoJsonBase64Msg = window.Base64.encode(JSON.stringify(intoMessageJson))\n // this.user.sendMessage(this.robot.id.toString(), intoJsonBase64Msg);\n // 消息入库\n this.pushMessage(window.Base64.encode(jsonBase64Msg))\n }\n\n setTimeout(()=>{\n // 发送给对方\n this.user.sendMessage(toAccount.toString(), jsonBase64Msg);\n // console.log(\"发送给对方\", jsonBase64Msg)\n },150)\n\n return messageJson\n },\n // 创建本地消息\n createLocalMessage(type, toAccount, payload = \"\", transferAccount = 0){\n const messageJson = {\n \"from_account\": parseInt(this.fetchMIMCTokenResult.data.appAccount),\n \"to_account\": parseInt(toAccount),\n \"biz_type\": type,\n \"version\": \"0\",\n \"platform\": this.platform,\n \"timestamp\": parseInt((new Date().getTime() + \" \").substr(0, 10)),\n \"key\": new Date().getTime(),\n \"read\": 0,\n \"transfer_account\": parseInt(transferAccount),\n \"payload\": payload + ''\n }\n return messageJson\n }\n \n\n }\n}\nexport default MimcPlugin;","export default {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY年MM月DD日',\n LLL: 'YYYY年MM月DD日Ah点mm分',\n LLLL: 'YYYY年MM月DD日ddddAh点mm分',\n l: 'YYYY-M-D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' ||\n meridiem === '上午') {\n return hour;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n } else {\n // '中午'\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute) {\n const hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: '[下]ddddLT',\n lastDay: '[昨天]LT',\n lastWeek: '[上]ddddLT',\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '周';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s内',\n past: '%s前',\n s: '几秒',\n ss: '%d秒',\n m: '1分钟',\n mm: '%d分钟',\n h: '1小时',\n hh: '%d小时',\n d: '1天',\n dd: '%d天',\n M: '1个月',\n MM: '%d个月',\n y: '1年',\n yy: '%d年'\n },\n week: {\n dow: 1,\n doy: 4\n }\n}","import Vue from 'vue'\nimport App from './App.vue'\nimport preview from 'vue-photo-preview'\nimport router from \"./router\"\nimport store from './store'\nimport 'vue-photo-preview/dist/skin.css'\nimport MintUI from 'mint-ui'\nimport 'mint-ui/lib/style.css'\nimport Helps from \"../plugins/help\"\nimport MimcPlugin from \"../plugins/mimc\"\nimport momentLocal from '../resource/moment_locale'\nvar moment = require('moment');\nmoment.locale(\"zh-cn\", momentLocal)\n\nimport axios from 'axios'\n\naxios.defaults.baseURL = '/api'\n\n// axios添加请求拦截器\naxios.interceptors.request.use(function (config) {\n const token = localStorage.getItem('Token') || \"\"\n config.headers = Object.assign({}, {\n 'Token': token,\n }, config.headers)\n return config;\n}, function (error) {\n // eslint-disable-next-line no-console\n console.log(error)\n return Promise.reject(error);\n});\n\nvar options={\n clickToCloseNonZoomable: false,\n fullscreenEl:false, //关闭全屏按钮\n}\nVue.use(preview, options)\nVue.use(Helps)\nVue.use(MimcPlugin)\nVue.use(MintUI)\nVue.config.productionTip = false\nnew Vue({\n router,\n store,\n render: h => h(App)\n}).$mount('#app')\n","import mod from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=stylus&\"; export default mod; export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=stylus&\""],"sourceRoot":""}
\ No newline at end of file
(function(t){function e(e){for(var i,o,c=e[0],r=e[1],l=e[2],d=0,h=[];d<c.length;d++)o=c[d],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&h.push(n[o][0]),n[o]=0;for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);u&&u(e);while(h.length)h.shift()();return a.push.apply(a,l||[]),s()}function s(){for(var t,e=0;e<a.length;e++){for(var s=a[e],i=!0,c=1;c<s.length;c++){var r=s[c];0!==n[r]&&(i=!1)}i&&(a.splice(e--,1),t=o(o.s=s[0]))}return t}var i={},n={app:0},a=[];function o(e){if(i[e])return i[e].exports;var s=i[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,o),s.l=!0,s.exports}o.m=t,o.c=i,o.d=function(t,e,s){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(o.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(s,i,function(e){return t[e]}.bind(null,i));return s},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="";var c=window["webpackJsonp"]=window["webpackJsonp"]||[],r=c.push.bind(c);c.push=e,c=c.slice();for(var l=0;l<c.length;l++)e(c[l]);var u=r;a.push([0,"chunk-vendors"]),s()})({0:function(t,e,s){t.exports=s("56d7")},"21fb":function(t,e,s){t.exports=s.p+"img/expression.73c98a16.png"},"42e0":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAALwUlEQVR4Xu1dXYhdVxVe68696T2jpokkGe8+QZM8iFBrEyq+SRMQQRE6DYjSB5OAlIIPTUSLbREn+tAHHzoBfVAsTag+amewD4piJ0V9KnSsD4KgnRTvPjMTQhIryTCTe5asy77Tm5tzzl57n5+cm9wDQyB3733WXt9Za397rbXPQZhctdIA1kqaiTAwAaRmD0EpgFy9enXXzZs3TxDR4UajsdRutxd37959rWZzr6U4hQOyvr5+eGtr6w1E3DU04wWl1BO11EDNhCoUkCiKjhLRGylzPKeUOl2z+ddOnEIB0VqfB4ATabNsNptH9u3bt1w7LdRIoKIBWQCAxzPmt6SUOlaj+ddOlEIBiaLoJBG9YpnlE0opBm5yJWigUEB4fK31CgB8IkPbK0qpgxM0kjVQOCASKyGis2EYzk1AuVMDhQNirGQJAB5LUzgRXZuenj442ZtUBIiF/g6kuKCUOjmxkts1UIqFGCvJpMDcBhGPdTodtqbJZTRQGiBRFB0gonctmp7Q4BEFlQYI36fb7c4h4g+yQEHEU51Oh63J+Yqi6HNxHL+IiI8CwIMA8D4A3DB/N82//2NRAIDZ338Q8T3+i+P430opblurq1RATJCRFcHKSrtWgiA44rrAr66uPtzr9d5CxB05NMoW/CYiXmw0Gm/OzMz8K8dYhXQtFRCWsCwa3O12f4KI3ypECx8MskpEDNCfduzY8fqePXvYsiq9SgfEuK5lRHwkbWZMgxuNxpFOp8PWJLq63e5vEfErosaejYjob41G43dE9LpS6s+ewzh1Kx0QQ4F5HTlqkcyJBmutfwUATzrNNl/j/xLRbwDgF2EY/iXfUOm9SwHEMKxnAGAWAA5IhXehwVEUfYeIfiwdu8h2RPTPRqPx83a7/bLr2meTo1BAoijiLCFv9mzWkCgXES2HYXjEJvTg9yr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iobiOHxC8sAugpdKSCeh4JumxNHkQcF1bwr5gjvoIHJ0WS9yNlJPyZtcNapU87GlQGSA4x+4QOzoiAIlrJciWSz6KGv0qPHwzJVAojkqEGCoqwneZOUa8uZeAACQRDsrmpNqQqQrK8mDOuIw/cc0p7Psz8Q5Ex4H8KWJ0o0VRmorAoQjs5yhWFWQocPkHKYI1eql9EV5kz6HwXgUlcbMPccIDzxjFw8W8Vc0WfRBTmT7aIISwbQK9Hk4xor3xgmJLYWgyA4WYZ/Fq5b20URSfnyMuoCbEBV4rKGhRhUCk5NTS37JnFskxr8bsuZJBVFmDMsXGK6XGXSbZu6Syc3ju2ENLhSWmvTY+UWYhOo6N8lNLiKogjpvO55QFgRAhpcm3TvfQGIhAbX5aUE9wUgxkpsBX6l1AZLXdV9saiPsjvb5zOqfvlmElj3jYVYNqd93ZRdGyyxlrEGZFAMMSj+npqaWsza2whpsNMROYmSXdqMLSCmNIhrjEfrZzNPMUk+n1Fl7GoUrLEExBwaejetPMi2FgjefnTXaPBYAmILifBTl5XDkNDgu1X1OK6A2Cis9Z2/Wmvbd3u9PsXksl7cMyxLEFq3AiKJBttcX17l30uAWF90Jkm72s5L+nyKKS9IY+mybPRV+mTbxjHKrezwT+UJqrxPz3B/Q3t5HRg9ruwUTq8bDR5LCxkAYzaGs/xyGf6/tNdz2B4EGw12/RST7X5Zv481IHkmPhLnslbFVEWDJ4AYZGw0uKo41wQQA0hdaPAEkCHfZaPB/J5fpVRRL2dL9LgTQIbUIqDBi0op368NiZa8CSAjarK8MM353SUiFIYaTQBJ0FhC8LL0V4YMxJgAkvIIm4NFfPT6WtJHzVyffGn7CSBSTVXUbgJIRYqW3mYCiFRTFbX7PyR+BY0YMYJnAAAAAElFTkSuQmCC"},4678:function(t,e,s){var i={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-SG":"cdab","./en-SG.js":"cdab","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-nz":"6f50","./en-nz.js":"6f50","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-tw":"90ea","./zh-tw.js":"90ea"};function n(t){var e=a(t);return s(e)}function a(t){if(!s.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}n.keys=function(){return Object.keys(i)},n.resolve=a,t.exports=n,n.id="4678"},"56d7":function(t,e,s){"use strict";s.r(e);s("cadf"),s("551c"),s("f751"),s("097d");var i=s("2b0e"),n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"mini-im-container",class:{"mini-im-pc-container":!t.isMobile,"mini-im-container-no-pto":!t.isShowHeader}},[i("span",{directives:[{name:"show",rawName:"v-show",value:t.isMobile&&t.isInputPongIng&&!t.isShowHeader,expression:"isMobile && (isInputPongIng && !isShowHeader)"}],staticClass:"input-ing"},[t._v(t._s(t.inputPongIngString))]),t.isShowHeader?i("mt-header",{attrs:{fixed:"",title:t.isInputPongIng?t.inputPongIngString:"在线客服"}},[i("div",{attrs:{slot:"left"},slot:"left"},[i("mt-button",{attrs:{icon:"back"},on:{click:t.back}})],1),i("mt-button",{attrs:{slot:"right"},on:{click:t.headRightBtn},slot:"right"},[t.isArtificial?i("span",[t._v("结束会话")]):i("img",{attrs:{title:"人工客服",src:"http://qiniu.cmp520.com/kefu_icon_2000.png",alt:""}})])],1):t._e(),t.isMobile?t._e():i("div",{staticClass:"mini-im-pc-header"},[t._m(0),i("span",{directives:[{name:"show",rawName:"v-show",value:t.isInputPongIng,expression:"isInputPongIng"}]},[t._v(t._s(t.inputPongIngString))]),i("div",{staticClass:"right"},[t.isArtificial?t._e():i("img",{attrs:{title:"人工客服",src:"http://qiniu.cmp520.com/kefu_icon_2000.png",alt:""},on:{click:t.headRightBtn}}),t.isArtificial?i("span",{on:{click:t.headRightBtn}},[t._v("结束会话")]):t._e(),i("div",{staticClass:"close-btn",on:{click:t.clickCloseWindow}},[t._v("ㄨ")])])]),i("div",{ref:"miniImBody",staticClass:"mini-im-body"},[i("ul",{staticClass:"mini-im-chat-list"},[t.isLoadMorLoading?i("li",{staticClass:"message-loading"},[i("mt-spinner",{attrs:{color:"#26a2ff",size:20,type:"triple-bounce"}})],1):t._e(),t._l(t.viewMessage,(function(e,s){return i("li",{key:s},[e.isShowDate?[i("div",{staticClass:"mini-im-chat-item"},[i("div",{staticClass:"chat-content"},[i("div",{staticClass:"chat-body"},[[i("div",{staticClass:"system"},[i("div",{staticClass:"content"},[i("span",[t._v(t._s(t.$formatFromNowDate(e.timestamp,"YYYY年MM月DD日 HH:mm")))])])])]],2)])])]:t._e(),i("div",{staticClass:"mini-im-chat-item",class:{self:e.from_account==t.userInfo.id}},[t.isShowInfo(e.biz_type)?i("div",{staticClass:"chat-avatar"},[i("img",{attrs:{src:e.avatar}})]):t._e(),i("div",{staticClass:"chat-content"},[i("div",{staticClass:"chat-body"},[e.isShowCancel?[e.from_account==t.userInfo.id&&t.isShowInfo(e.biz_type)?i("span",{staticClass:"cancel-btn",on:{click:function(){return t.cancelMessage(e.key)}}},[t._v("撤回")]):t._e()]:t._e(),"text"==e.biz_type||"welcome"==e.biz_type?[i("div",{staticClass:"text"},[i("span",{domProps:{innerHTML:t._s(e.payload.replace(/\n/gi,"<br />"))}})])]:t._e(),"photo"==e.biz_type?[i("div",{staticClass:"photo"},[e.percent&&100!=e.percent?i("span",[t._v("上传中"+t._s(e.percent)+"%")]):t._e(),t.isMobile?i("img",{attrs:{src:e.payload,preview:"1"}}):i("img",{attrs:{src:e.payload},on:{click:function(s){return t.clickPhoto(e.payload)}}})])]:t._e(),"knowledge"==e.biz_type?[i("div",{staticClass:"knowledge"},[i("div",{staticClass:"title"},[t._v("以下是您关心的相关问题?")]),t._l(JSON.parse(e.payload),(function(e,s){return i("a",{key:s,attrs:{href:"javascript:void(0);"},on:{click:function(){return t.sendKnowledgeMessage(e.title)}}},[i("span",[t._v("• "+t._s(e.title))])])})),i("a",{on:{click:t.headRightBtn}},[t._v("• 以上都不是?我要找人工")])],2)]:t._e(),"end"==e.biz_type?[t._m(1,!0)]:t._e(),"timeout"==e.biz_type?[i("div",{staticClass:"system"},[i("div",{staticClass:"content"},[i("span",[t._v(t._s(e.payload))])])])]:t._e(),"system"==e.biz_type?[i("div",{staticClass:"system"},[i("div",{staticClass:"content"},[i("span",{domProps:{innerHTML:t._s(e.payload)}})])])]:t._e(),"cancel"==e.biz_type?[i("div",{staticClass:"system"},[i("div",{staticClass:"content"},[e.from_account==t.userInfo.id?i("span",[t._v("您撤回了一条消息")]):i("span",[t._v("对方撤回了一条消息")])])])]:t._e(),"transfer"==e.biz_type?[i("div",{staticClass:"system"},[i("div",{staticClass:"content"},[i("span",[t._v("已为您转接"+t._s(e.transfer_account)+"号客服")])])])]:t._e()],2)])])],2)}))],2),t.isNotNetWork?i("div",{staticClass:"no-network"},[i("img",{attrs:{src:s("42e0"),alt:""}}),i("span",[t._v("网络连接已断开,请重新加载尝试~")]),i("button",{on:{click:t.resetLoad}},[t._v("重新加载")])]):t._e()]),t.isLoading?i("div",{staticClass:"mini-im-loading"},[i("mt-spinner",{attrs:{type:"triple-bounce",color:"#26a2ff"}})],1):t._e(),i("div",{directives:[{name:"show",rawName:"v-show",value:t.showEmoji,expression:"showEmoji"}],staticClass:"mini-im-emoji"},[i("div",{staticClass:"mini-im-emoji-content"},t._l(t.emojis,(function(e,s){return i("span",{key:s,on:{click:function(){return t.clickEmoji(e)}}},[t._v(t._s(e))])})),0)]),i("div",{directives:[{name:"show",rawName:"v-show",value:t.handshakeKeywordList.length>0,expression:"handshakeKeywordList.length > 0"}],staticClass:"mini-im-knowledge"},[i("div",{staticClass:"mask",on:{click:function(e){t.handshakeKeywordList=[]}}}),i("span",[t._v("以下是您关心的相关问题?")]),i("ul",t._l(t.handshakeKeywordList,(function(e,s){return i("li",{key:s,staticClass:"sendKnowledgeMessage",attrs:{data:e.title},on:{click:function(s){!t.isIOS&&t.sendKnowledgeMessage(e.title)}}},[t._v("• "+t._s(e.title))])})),0)]),i("div",{staticClass:"mini-im-tabbar-input"},[i("span",{staticClass:"photo-btn"},[i("img",{attrs:{src:s("bed0"),alt:""}}),i("input",{attrs:{onClick:"this.value = null",type:"file",accept:"image/*"},on:{change:t.sendPhotoMessageEvent}})]),i("span",{staticClass:"expression-btn",on:{click:function(e){t.showEmoji=!t.showEmoji}}},[i("img",{attrs:{src:s("21fb"),alt:""}})]),i("span",{directives:[{name:"show",rawName:"v-show",value:t.isMobile&&!t.isShowHeader,expression:"isMobile && !isShowHeader"}],staticClass:"serverci",class:{on:!t.isArtificial},on:{click:t.headRightBtn}},[t.isArtificial?i("span",[t._v("结束会话")]):i("img",{attrs:{title:"人工客服",src:"http://qiniu.cmp520.com/bfbfbf.png",alt:""}})]),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.chatValue,expression:"chatValue"}],ref:"textarea",staticStyle:{"vertical-align":"top",outline:"none"},attrs:{maxlength:"200",placeholder:"请用一句话描述您的问题~"},domProps:{value:t.chatValue},on:{keyup:[function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.keyUpEvent(e)},function(e){return!e.type.indexOf("key")&&13!==e.keyCode&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.shiftKey?t.enterShift(e):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.enterSendMessage(e)}],submit:t.sendTextMessage,focus:t.chatInputFocus,blur:t.chatInputBlur,input:function(e){e.target.composing||(t.chatValue=e.target.value)}}}),i("button",{ref:"sendButton",staticClass:"mini-input-send",attrs:{type:"button"}},[t._v("发送")])])],1)},a=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"title"},[s("img",{attrs:{src:"http://qiniu.cmp520.com/kefu_icon_2000.png",alt:""}}),s("span",[t._v("在线客服")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"system"},[s("div",{staticClass:"content"},[s("span",[t._v("本次会话结束,感谢您的支持!")])])])}],o=(s("c5f6"),s("7f7f"),s("28a5"),s("386d"),s("4917"),s("bc3a")),c=s.n(o),r=s("76a0"),l=s.n(r),u=s("cea2"),d=s("1fba"),h=s("bb7f"),m={name:"app",data:function(){return{messages:[],isLoading:!0,isNotNetWork:!1,userLocal:"",isFirstGetMessage:!0,platform:5,uid:null,chatValue:"",emojis:h.emojiData,showEmoji:!1,userInfo:{},userAccount:null,companyInfo:null,uploadToken:null,isArtificial:!1,artificialAccount:null,robotInfo:null,robotAccount:null,isLoadMorEnd:!1,isUserSendLongTimeSystemMessage:!1,isAdminSendLongTimeSystemMessage:!1,isInputPongIng:!1,isLoadMorLoading:!1,isSendPong:!1,qiniuObservable:null,inputPongIngString:"对方正在输入...",scroll:null,isShowHeader:!0,isMobile:!0,handshakeKeywordList:[],searchHandshakeTimer:null}},created:function(){this.getLocal(),this.run()},computed:{account:function(){return this.isArtificial?this.artificialAccount:this.robotAccount},isIOS:function(){return!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)},isSafari:function(){return navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<1},isJudgeBigScreen:function(){return this.$judgeBigScreen()},viewMessage:function(){for(var t=this.messages,e=0;e<t.length;e++)0==e&&(t[e].isShowDate=!0),e<t.length-1&&(t[e+1].isShowDate=!1,t[e+1].timestamp-120>t[e].timestamp&&(t[e+1].isShowDate=!0));return t}},mounted:function(){var t=this,e=this.queryToJson(location.search);e&&e.c&&localStorage.clear();var s=this.queryToJson(localStorage.getItem("urlQuery"));s&&(e=Object.assign({},s,e),e.u=s.u),e&&("0"==e.h&&(this.isShowHeader=!1),"0"==e.m&&(this.isMobile=!1,this.isShowHeader=!1),e.u&&(this.userAccount=parseInt(e.u)),e.p&&(this.platform=parseInt(e.p)),e.uid&&(this.uid=parseInt(e.uid)),"0"==e.r?(this.isArtificial=!0,this.artificialAccount=parseInt(e.a)):this.robotAccount=parseInt(e.a));var i=localStorage.getItem("isArtificial_"+this.userAccount),n=localStorage.getItem("artificialAccount_"+this.userAccount);"true"==i&&(this.isArtificial=!0,this.artificialAccount=parseInt(n)),setTimeout((function(){t.isLoading=!1,t.scroll=new d["a"](t.$refs.miniImBody,{click:!0,tab:!0,scrollY:!0,scrollbar:!0,bounceTime:400,preventDefaultException:{className:/(^|\s)text(\s|$)/},mouseWheel:!0}),t.scroll.on("touchEnd",(function(e){e.y>30&&t.loadMorData()})),t.addSendButtonTouchEventListener(),t.createLinkQuery(),t.scrollIntoBottom()}),500),this.onCheckIsOutSession(),document.addEventListener("paste",this.inputPaste,!1)},beforeDestroy:function(){this.toggleWindow(this.userAccount,0)},methods:{run:function(){var t=this;this.getAllhttp(),this.upLastActivity(),this.$mimcInstance.addEventListener("receiveP2PMsg",this.receiveP2PMsg),this.$mimcInstance.addEventListener("disconnect",(function(){console.log("链接断开!"),t.isNotNetWork=!0})),this.$mimcInstance.addEventListener("statusChange",(function(t,e,s,i){console.log("状态发生变化",t,e,s,i)})),this.$mimcInstance.addEventListener("serverAck",(function(e,s,i,n){console.log("发送消息服务器ack",e,s,i,n),localStorage.setItem("userLastCallBackMessageTime_"+t.userAccount,Date.now()),t.isUserSendLongTimeSystemMessage=!1})),this.onCheckIsloogTimeNotCallBack()},getLocal:function(){var t=this,e="";c.a.get("https://restapi.amap.com/v3/ip?key="+e).then((function(e){e.data.province&&(console.log(e.data.province+e.data.city),t.userLocal=e.data.province+e.data.city)})).catch((function(t){console.error(t)}))},initMimc:function(){var t=this,e=this.$mimcInstance,s=e.getLocalCacheUser(this.userAccount);this.userInfo=s;var i=this.userAccount?this.userAccount:s?s.id:0;e.init({type:0,address:this.userLocal,uid:this.uid,platform:this.platform,account_id:i},(function(s){s?(t.userInfo=s,t.userAccount=s.id,t.cleanRead(s.id),t.toggleWindow(s.id,1),e.login((function(){setTimeout((function(){t.getMessageRecord(),t.artificialAccount||(console.log("握手消息"),e.sendMessage("handshake",t.robotAccount,"")),t.scrollIntoBottom()}),500)}))):setTimeout((function(){return t.initMimc()}),1e3)})),this.onServciceLastMessageTimeNotCallBack()},resetLoad:function(){window.location.reload()},enterShift:function(t){this.isMobile||"Enter"!=t.code&&(this.chatValue=this.chatValue+"\n")},addSendButtonTouchEventListener:function(){var t=this;this.isIOS?document.addEventListener("touchstart",(function(e){"mini-input-send"==e.target.getAttribute("class")&&t.sendTextMessage(),"sendKnowledgeMessage"==e.target.getAttribute("class")&&(console.log("监听发送按钮触摸事件",e.target.getAttribute("data")),t.sendKnowledgeMessage(e.target.getAttribute("data")))}),!1):this.$refs.sendButton.addEventListener("click",this.sendTextMessage,!1)},cleanRead:function(t){c.a.get("/public/clean_read/"+t)},toggleWindow:function(t,e){c.a.put("/public/window/"+t,{window:e})},queryToJson:function(t){if(!t||""==t)return null;var e=t.substr(1,t.length).split("&");if(!e)return null;for(var s={},i=0;i<e.length;i++){var n=e[i].split("=");s[n[0]]=n[1]}return s},back:function(){history.go(-1)},isShowInfo:function(t){return-1==["end","transfer","cancel","timeout","system"].indexOf(t)},clickPhoto:function(t){if(-1==t.indexOf("http")){var e=new Image;e.src=t;var s=window.open("","_blank");s.document.write(e.outerHTML),s.document.title="图片",s.document.close()}else window.open(t)},upLastActivity:function(){var t=this;this.onCheckIsOutSession();var e=this.$mimcInstance.getLocalCacheUser(this.userAccount);e&&c.a.get("/public/activity/"+e.id),this.isArtificial&&localStorage.setItem("artificialTime_"+this.userAccount,Date.now()),setTimeout((function(){return t.upLastActivity()}),6e4)},onCheckIsOutSession:function(){var t=localStorage.getItem("artificialTime_"+this.userAccount);t&&(t=parseInt(t),Date.now()>t+6e5&&(this.isArtificial=!1,this.artificialAccount=null))},loadMorData:function(){var t=this;this.isLoadMorLoading||this.isLoadMorEnd||(this.isLoadMorLoading=!0,setTimeout((function(){t.getMessageRecord(),t.isLoadMorLoading=!1}),1e3))},localAdmin:function(t){var e=localStorage.getItem("admin_"+t);return e?JSON.parse(e):null},localRobot:function(t){var e=localStorage.getItem("robot_"+t);return e?JSON.parse(e):null},clickEmoji:function(t){this.showEmoji=!1,this.chatValue=this.chatValue+t,this.scrollIntoBottom()},sendPhotoMessageEvent:function(t){var e=t.target,s=e.files[0];this.sendPhotoMessage(s)},sendPhotoMessage:function(t){var e=new FileReader;e.readAsDataURL(t);var s,i=this,n=parseInt(1e4*Math.random()*(new Date).getTime())+t.name.substr(t.name.lastIndexOf("."));e.onload=function(){var e=function(){s.percent=0,i.qiniuObservable=null,i.removeMessage(i.userInfo.id,s.key),Object(r["Toast"])({message:"上传失败,请重新上传!"});var t=i.$mimcInstance,e=t.createLocalMessage("system",i.account,"您刚刚上传的图片失败了,请重新上传!");i.messages.push(i.handlerMessage(e)),i.scrollIntoBottom()},a=function(t){i.qiniuObservable=null,s.percent=100;var e=i.uploadToken.host+"/"+t;i.$mimcInstance.sendMessage("photo",i.account,e)};s=i.$mimcInstance.createLocalMessage("photo",i.account,this.result),s["percent"]=0,s.isShowCancel=!0,setTimeout((function(){s.isShowCancel=!1}),1e4),i.messages.push(i.handlerMessage(s));var o=Object.assign({},s);if(o.payload=i.uploadToken.host+"/"+n,i.$previewRefresh(),i.scrollIntoBottom(),1==i.uploadToken.mode){var l=new FormData;l.append("file",t),l.append("file_name",n),c.a.post("/public/upload",l).then((function(t){a(t.data.data)})).catch((function(){e()}))}else if(2==i.uploadToken.mode){var d={quality:.92,noCompressIfLarger:!0,maxWidth:1500};u["compressImage"](t,d).then((function(o){var l=u["upload"](o.dist,n,i.uploadToken.secret,{},{mimeType:null});i.qiniuObservable=l.subscribe({next:function(t){s.percent=Math.ceil(t.total.percent),t.total.size<1&&(i.qiniuObservable.unsubscribe(),i.cancelMessage(s.key),Object(r["Toast"])({message:"上传失败,该图片已损坏!"}))},error:function(){var s=new FormData;s.append("fileType","image"),s.append("fileName","file"),s.append("key",n),s.append("token",i.uploadToken.secret),s.append("file",t),c.a.post("https://upload.qiniup.com",s).then((function(){a(n)})).catch((function(){e()}))},complete:function(t){a(t.key)}})}))}}},scrollIntoBottom:function(){var t=this;setTimeout((function(){var e=t.$refs.miniImBody.querySelectorAll("li");t.scroll&&t.scroll.scrollToElement(e[e.length-1])}),50)},chatInputFocus:function(){this.scrollIntoBottom(),this.showEmoji=!1},chatInputBlur:function(){window.chatInputInterval=null,window.scroll(0,0)},getRobot:function(){var t=this;return c.a.get("/public/robot/1").then((function(e){var s=e.data.data;localStorage.setItem("robot_"+s.id,JSON.stringify(s)),t.robotAccount=s.id,t.robotInfo=s})).catch((function(t){Object(r["Toast"])({message:t.response.data.message})}))},getUploadSecret:function(){var t=this;return c.a.get("/public/secret").then((function(e){t.uploadToken=e.data.data}))},getCompanyInfo:function(){var t=this;return c.a.get("/public/company").then((function(e){t.companyInfo=e.data.data})).catch((function(t){Object(r["Toast"])({message:t.response.data.message})}))},getAllhttp:function(){var t=this;c.a.all([this.getRobot(),this.getCompanyInfo(),this.getUploadSecret()]).then(c.a.spread((function(){t.initMimc()}))).catch((function(){return setTimeout((function(){return t.getAllhttp()}),1e3)}))},receiveP2PMsg:function(t){if(console.log(t),"transfer"==t.biz_type){this.isArtificial=!0,this.artificialAccount=t.transfer_account;var e=JSON.parse(t.payload);localStorage.setItem("admin_"+e.id,JSON.stringify(e)),localStorage.setItem("adminLastCallBackMessageTime_"+e.id,Date.now()),this.isAdminSendLongTimeSystemMessage=!1}if(!this.isArtificial||"text"!=t.biz_type&&"photo"!=t.biz_type&&"cancel"!=t.biz_type||(localStorage.setItem("adminLastCallBackMessageTime_"+this.account,Date.now()),this.isAdminSendLongTimeSystemMessage=!1),"cancel"==t.biz_type&&this.removeMessage(t.from_account,t.payload),"end"!=t.biz_type&&"timeout"!=t.biz_type||(this.isArtificial=!1,this.artificialAccount=null),"pong"!=t.biz_type){if("search_knowledge"==t.biz_type)return this.handshakeKeywordList=[],void(""!=t.payload&&(this.handshakeKeywordList=JSON.parse(t.payload)));this.messagesPushMemory(t),this.scrollIntoBottom(),this.$previewRefresh(),window.parent.postMessage({newMessage:1},"*")}else this.inputPongIng()},inputPongIng:function(){var t=this;this.isInputPongIng||(this.isInputPongIng=!0,setTimeout((function(){t.inputPongIngString="对方正在输入."}),500),setTimeout((function(){t.inputPongIngString="对方正在输入.."}),1500),setTimeout((function(){t.inputPongIngString="对方正在输入...",t.isInputPongIng=!1}),3e3))},enterSendMessage:function(){this.isMobile||(this.sendTextMessage(),this.$refs.textarea.focus())},sendTextMessage:function(){if(0!=this.userInfo.online){var t=this.chatValue.trim();if(""!=t){var e=this.$mimcInstance,s=e.sendMessage("text",this.account,t);s.isShowCancel=!0,setTimeout((function(){return s.isShowCancel=!1}),1e4),this.messagesPushMemory(s),this.chatValue="",this.handshakeKeywordList=[]}}else Object(r["Toast"])({message:"您貌似掉线了"})},cancelMessage:function(t){var e=this.$mimcInstance,s=e.sendMessage("cancel",this.account,t);this.messagesPushMemory(s),this.removeMessage(this.userInfo.id,t),this.qiniuObservable&&this.qiniuObservable.unsubscribe()},sendKnowledgeMessage:function(t){this.handshakeKeywordList=[];var e=this.$mimcInstance,s=e.sendMessage("text",this.account,t);this.messagesPushMemory(s),this.chatValue=""},headRightBtn:function(){var t=this;if(!window.isClickHeadRightBtn){window.isClickHeadRightBtn=!0;var e=this.$mimcInstance;if(this.isArtificial)return r["MessageBox"].confirm("您确定关闭此次会话吗?","温馨提示! ").then((function(){var s=e.sendMessage("end",t.account,"");t.messagesPushMemory(s),t.isArtificial=!1,t.artificialAccount=null})),void setTimeout((function(){return window.isClickHeadRightBtn=!1}),3e3);var s=e.sendMessage("text",this.account,"人工");this.messagesPushMemory(s),setTimeout((function(){return window.isClickHeadRightBtn=!1}),3e3)}},messagesPushMemory:function(t){"pong"!=t.biz_type&&"handshake"!=t.biz_type&&"into"!=t.biz_type&&(this.messages.push(this.handlerMessage(t)),this.scrollIntoBottom())},handlerMessage:function(t){var e="http://qiniu.cmp520.com/avatar_degault_3.png",s=this.localAdmin(t.from_account),i=this.localRobot(t.from_account);return s&&t.from_account==s.id?(t.nickname=s.nickname,t.avatar=""==s.avatar?e:s.avatar):i&&t.from_account==i.id?(t.nickname=i.nickname,t.avatar=""==i.avatar?e:i.avatar):t.from_account==this.userInfo.id&&(t.nickname=this.userInfo.nickname,-1!=this.userInfo.nickname.indexOf(this.userInfo.id)&&(t.nickname="我"),t.avatar=""==this.userInfo.avatar?e:this.userInfo.avatar),t},getMessageRecord:function(){var t=this,e=20,s=this.userInfo.id,i=this.userInfo.token,n=0==this.messages.length?parseInt(((new Date).getTime()+" ").substr(0,10)):this.messages[0].timestamp;c.a.post("/public/messages",{timestamp:n,page_size:e,account:s},{headers:{token:i}}).then((function(s){var i=s.data.data.list||[];i.length<e&&(t.isLoadMorEnd=!0),0==t.messages.length&&i.length>0?(t.messages=s.data.data.list.map((function(e){return t.handlerMessage(e)})),t.scrollIntoBottom()):i.length>0&&(i=i.map((function(e){return t.handlerMessage(e)})),t.messages=i.concat(t.messages))})).catch((function(t){console.log(t)}))},keyUpEvent:function(){var t=this;this.isArtificial&&(this.isSendPong||(this.isSendPong=!0,setTimeout((function(){return t.isSendPong=!1}),100),this.$mimcInstance.sendMessage("pong",this.account,this.chatValue)))},removeMessage:function(t,e){for(var s=[],i=0;i<this.messages.length;i++)this.messages[i].key==e&&this.messages[i].from_account==t||s.push(this.messages[i]);this.messages=s},createLinkQuery:function(){var t=this.isArtificial?0:1,e=0==t?this.artificialAccount:this.robotAccount,s=this.isMobile?1:0,i=this.isShowHeader?1:0,n=this.platform?this.platform:1,a=this.userAccount?"&u="+this.userAccount:"",o=this.uid?"&uid="+this.uid:"",c="?h="+i+"&m="+s+"&p="+n+"&r="+t+"&a="+e+a+o;history.replaceState(null,null,c),null!=this.userAccount&&"null"!=this.userAccount&&""!=this.userAccount&&localStorage.setItem("urlQuery",c)},clickCloseWindow:function(){window.parent.postMessage({clickCloseWindow:!0},"*")},onCheckIsloogTimeNotCallBack:function(){var t=this,e=localStorage.getItem("userLastCallBackMessageTime_"+this.userAccount)||Date.now();if(this.isArtificial&&!this.isUserSendLongTimeSystemMessage&&Date.now()-e>=3e5){var s=this.$mimcInstance,i=s.createLocalMessage("system",this.account,"您已超过5分钟未回复消息,系统3分钟后将结束对话");this.messages.push(this.handlerMessage(i)),this.isUserSendLongTimeSystemMessage=!0,this.scrollIntoBottom()}setTimeout((function(){return t.onCheckIsloogTimeNotCallBack()}),1e4)},onServciceLastMessageTimeNotCallBack:function(){var t=this;if(this.robotInfo){var e=this.robotInfo.loog_time_wait_text,s=localStorage.getItem("adminLastCallBackMessageTime_"+this.account)||Date.now();if(this.isArtificial&&!this.isAdminSendLongTimeSystemMessage&&""!=e.trim()&&Date.now()-s>=12e4){var i=this.$mimcInstance,n=i.createLocalMessage("text",this.account,e);n.from_account=this.robotAccount,this.messages.push(this.handlerMessage(n)),this.isAdminSendLongTimeSystemMessage=!0,this.scrollIntoBottom()}setTimeout((function(){return t.onServciceLastMessageTimeNotCallBack()}),1e4)}},onSearchHandshake:function(){var t=this;if(this.chatValue&&!this.isArtificial){this.searchHandshakeTimer&&clearTimeout(this.searchHandshakeTimer);var e=this.$mimcInstance;this.searchHandshakeTimer=setTimeout((function(){e.sendMessage("search_knowledge",t.robotAccount,t.chatValue),t.searchHandshakeTimer=null}),500)}else this.handshakeKeywordList=[]},inputPaste:function(t){if(!this.isMobile){var e=this,s=t.clipboardData,i=window.navigator.userAgent;if(t.clipboardData&&t.clipboardData.items&&!(s.items&&2===s.items.length&&"string"===s.items[0].kind&&"file"===s.items[1].kind&&s.types&&2===s.types.length&&"text/plain"===s.types[0]&&"Files"===s.types[1]&&i.match(/Macintosh/i)&&Number(i.match(/Chrome\/(\d{2})/i)[1])<49))for(var n=0;n<s.items.length;n++){var a=s.items[n];if("file"==a.kind){var o=a.getAsFile();if(0===o.size)return;e.sendPhotoMessage(o)}}}}},watch:{messages:function(){var t=this;setTimeout((function(){t.scroll&&t.scroll.refresh(),t.$previewRefresh()}),50)},isArtificial:function(t){this.createLinkQuery(),localStorage.setItem("isArtificial_"+this.userAccount,t),localStorage.setItem("artificialTime_"+this.userAccount,Date.now()),t||localStorage.removeItem("artificialTime_"+this.userAccount)},artificialAccount:function(){localStorage.setItem("artificialAccount_"+this.userAccount,this.artificialAccount)},userInfo:function(){this.createLinkQuery()},chatValue:function(){this.onSearchHandshake()}}},f=m,g=(s("7faf"),s("2877")),p=Object(g["a"])(f,n,a,!1,null,null,null),b=p.exports,v=s("d1d4"),y=s.n(v),k=(s("394c"),s("aa35"),s("c1df")),w={install:function(t,e){t.prototype.$myMethod=function(){console.log(e)},t.prototype.$formatUnixDate=function(t,e){return k(parseInt(t+"000")).format(e)},t.prototype.$formatFromNowDate=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm";return k().format("YYYYMMDD")==k(parseInt(t+"000")).format("YYYYMMDD")?"今天 "+k(parseInt(t+"000")).format("HH:mm"):k(parseInt(t+"000")).format(e)},t.prototype.$robotNickname=function(t){for(var e,s=this.$store.getters.robots,i=0;i<s.length;i++)s[i].id==t&&(e=s[i].nickname);return e},t.prototype.$judgeBigScreen=function(){var t=!1,e=window.screen.height/window.screen.width,s=window.screen.height==window.screen.availHeight?1.8:1.65;return e>s&&(t=!0),t}}},M=w,I=(s("6b54"),{install:function(t,e){console.log(e),t.MimcInstance=t.prototype.$mimcInstance={user:null,robot:null,platform:5,fetchMIMCTokenResult:null,_receiveP2PMsgCallback:null,_statusChangeCallback:null,_serverAckCallback:null,_disconnectCallback:null,init:function(t,e){this.platform=t.platform,this.fetchMIMCToken(t,e),this.getRobot()},getLocalCacheUser:function(t){var e=localStorage.getItem("miniImAppUser_"+t);return e?JSON.parse(e):null},fetchMIMCToken:function(t,e){var s=this;c.a.post("/public/register",t).then((function(t){s.fetchMIMCTokenResult=t.data.data.token,localStorage.setItem("miniImAppUser_"+t.data.data.user.id,JSON.stringify(t.data.data.user)),console.log("MIMC初始化成功"),e&&e(t.data.data.user)})).catch((function(t){e&&e(null),console.log(t.response),Object(r["Toast"])({message:t.response.data.message})}))},getRobot:function(){var t=this;c.a.get("/public/robot/1").then((function(e){t.robot=e.data.data})).catch((function(t){Object(r["Toast"])({message:"mimc初始化失败,请刷新重试"+t.response.data.message})}))},pushMessage:function(t){var e=this;c.a.post("/public/message/push",{msgType:"NORMAL_MSG",payload:t}).then((function(s){console.log(s.data),200!=s.data["code"]&&setTimeout((function(){return e.pushMessage(t)}),300)})).catch((function(){setTimeout((function(){return e.pushMessage(t)}),300)}))},login:function(t){var e=this;try{if(this.user)return;var s=this.fetchMIMCTokenResult;this.user=new MIMCUser(s.data.appId,s.data.appAccount,"666"),this.user.registerP2PMsgHandler((function(t){var s=JSON.parse(window.Base64.decode(t.getPayload()));e._receiveP2PMsgCallback&&e._receiveP2PMsgCallback(s)})),this.user.registerFetchToken((function(){return s})),this.user.registerStatusChange((function(t,s,i,n){e._statusChangeCallback&&e._statusChangeCallback(t,s,i,n)})),this.user.registerServerAckHandler((function(t,s,i,n){e._serverAckCallback&&e._serverAckCallback(t,s,i,n)})),this.user.registerDisconnHandler((function(){e._disconnectCallback&&e._disconnectCallback()})),this.user.login(),window.mimcInstance=this,t&&t(),console.log("MIMC登录成功")}catch(i){console.log("MIMC登录失败"),setTimeout((function(){e.login()}),1e3)}},logout:function(){this.user&&(this.user.logout(),this.user=null)},addEventListener:function(t,e){switch(t){case"receiveP2PMsg":this._receiveP2PMsgCallback=e;break;case"statusChange":this._statusChangeCallback=e;break;case"serverAck":this._serverAckCallback=e;break;case"disconnect":this._disconnectCallback=e;break}},sendMessage:function(t,e){var s=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.user){var n={from_account:parseInt(this.fetchMIMCTokenResult.data.appAccount),to_account:parseInt(e),biz_type:t,version:"0",timestamp:parseInt(((new Date).getTime()+" ").substr(0,10)),key:(new Date).getTime(),read:0,platform:this.platform,transfer_account:0,payload:i+""},a=window.Base64.encode(JSON.stringify(n));return"contacts"!=t&&"pong"!=t&&"welcome"!=t&&"handshake"!=t&&"search_knowledge"!=t&&this.pushMessage(window.Base64.encode(a)),setTimeout((function(){s.user.sendMessage(e.toString(),a)}),150),n}Object(r["Toast"])({message:"服务异常,请刷新重试!"})},createLocalMessage:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n={from_account:parseInt(this.fetchMIMCTokenResult.data.appAccount),to_account:parseInt(e),biz_type:t,version:"0",platform:this.platform,timestamp:parseInt(((new Date).getTime()+" ").substr(0,10)),key:(new Date).getTime(),read:0,transfer_account:parseInt(i),payload:s+""};return n}}}}),j=I,_={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY年MM月DD日",LLL:"YYYY年MM月DD日Ah点mm分",LLLL:"YYYY年MM月DD日ddddAh点mm分",l:"YYYY-M-D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"下午"===e||"晚上"===e?t+12:t>=11?t:t+12},meridiem:function(t,e){var s=100*t+e;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"周";default:return t}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},week:{dow:1,doy:4}},A=s("c1df");A.locale("zh-cn",_),c.a.defaults.baseURL="/v1";var C={clickToCloseNonZoomable:!1,fullscreenEl:!1};i["default"].use(y.a,C),i["default"].use(M),i["default"].use(j),i["default"].use(l.a),i["default"].config.productionTip=!1,new i["default"]({render:function(t){return t(b)}}).$mount("#app")},"7faf":function(t,e,s){"use strict";var i=s("8fba"),n=s.n(i);n.a},"8fba":function(t,e,s){},bb7f:function(t,e){var s=["😀","😁","😂","🤣","😃","😄","😅","😆","😉","😊","😋","😎","😍","😘","😗","😙","😚","🙂","🤗","🤩","🤔","🤨","😐","😑","😶","🙄","😏","😣","😥","😮","🤐","😯","😪","😫","😴","😌","😛","😜","😝","🤤","😒","😓","😔","😕","🙃","🤑","😲","🙁","😖","😞","😟","😤","😢","😭","😦","😧","😨","😩","🤯","😬","😰","😱","😳","🤪","😵","😡","😠","🤬","😷","🤒","🤕","🤢","🤮","🤧","😇","🤠","🤡","🤥","🤫","🤭","🧐","🤓","😈","👿","👹","👺","💀","👻","👽","🤖","💩","😺","😸","😹","😻","😼","😽","🙀","😿","😾","🤲","👐","🙌","👏","🤝","👍","👎","👊","✊","🤛","🤜","🤞","✌️","🤟","🤘","👌","👈","👉","👆","👇","☝️","✋","🤚","🖐","🖖","👋","🤙","💪","🖕","✍️","🙏"];e.emojiData=s},bed0:function(t,e,s){t.exports=s.p+"img/photo_btn.c337b681.png"}});
//# sourceMappingURL=app.eab418bf.js.map
\ No newline at end of file
This diff could not be displayed because it is too large.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e6009ff"],{"21fb":function(t,i,e){t.exports=e.p+"img/expression.73c98a16.png"},"382d":function(t,i,e){},"5dbc":function(t,i,e){var s=e("d3f4"),o=e("8b97").set;t.exports=function(t,i,e){var n,r=i.constructor;return r!==e&&"function"==typeof r&&(n=r.prototype)!==e.prototype&&s(n)&&o&&o(t,n),t}},"7d02":function(t,i){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"},"8b97":function(t,i,e){var s=e("d3f4"),o=e("cb7c"),n=function(t,i){if(o(t),!s(i)&&null!==i)throw TypeError(i+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,i,s){try{s=e("9b43")(Function.call,e("11e9").f(Object.prototype,"__proto__").set,2),s(t,[]),i=!(t instanceof Array)}catch(o){i=!0}return function(t,e){return n(t,e),i?t.__proto__=e:s(t,e),t}}({},!1):void 0),check:n}},aa77:function(t,i,e){var s=e("5ca1"),o=e("be13"),n=e("79e5"),r=e("fdef"),a="["+r+"]",h="​…",l=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),p=function(t,i,e){var o={},a=n((function(){return!!r[t]()||h[t]()!=h})),l=o[t]=a?i(u):r[t];e&&(o[e]=l),s(s.P+s.F*a,"String",o)},u=p.trim=function(t,i){return t=String(o(t)),1&i&&(t=t.replace(l,"")),2&i&&(t=t.replace(c,"")),t};t.exports=p},bb7f:function(t,i){var e=["😀","😁","😂","🤣","😃","😄","😅","😆","😉","😊","😋","😎","😍","😘","😗","😙","😚","🙂","🤗","🤩","🤔","🤨","😐","😑","😶","🙄","😏","😣","😥","😮","🤐","😯","😪","😫","😴","😌","😛","😜","😝","🤤","😒","😓","😔","😕","🙃","🤑","😲","🙁","😖","😞","😟","😤","😢","😭","😦","😧","😨","😩","🤯","😬","😰","😱","😳","🤪","😵","😡","😠","🤬","😷","🤒","🤕","🤢","🤮","🤧","😇","🤠","🤡","🤥","🤫","🤭","🧐","🤓","😈","👿","👹","👺","💀","👻","👽","🤖","💩","😺","😸","😹","😻","😼","😽","🙀","😿","😾","🤲","👐","🙌","👏","🤝","👍","👎","👊","✊","🤛","🤜","🤞","✌️","🤟","🤘","👌","👈","👉","👆","👇","☝️","✋","🤚","🖐","🖖","👋","🤙","💪","🖕","✍️","🙏"];i.emojiData=e},bed0:function(t,i,e){t.exports=e.p+"img/photo_btn.c337b681.png"},c5f6:function(t,i,e){"use strict";var s=e("7726"),o=e("69a8"),n=e("2d95"),r=e("5dbc"),a=e("6a99"),h=e("79e5"),l=e("9093").f,c=e("11e9").f,p=e("86cc").f,u=e("aa77").trim,d="Number",m=s[d],f=m,g=m.prototype,v=n(e("2aeb")(g))==d,y="trim"in String.prototype,w=function(t){var i=a(t,!1);if("string"==typeof i&&i.length>2){i=y?i.trim():u(i,3);var e,s,o,n=i.charCodeAt(0);if(43===n||45===n){if(e=i.charCodeAt(2),88===e||120===e)return NaN}else if(48===n){switch(i.charCodeAt(1)){case 66:case 98:s=2,o=49;break;case 79:case 111:s=8,o=55;break;default:return+i}for(var r,h=i.slice(2),l=0,c=h.length;l<c;l++)if(r=h.charCodeAt(l),r<48||r>o)return NaN;return parseInt(h,s)}}return+i};if(!m(" 0o1")||!m("0b1")||m("+0x1")){m=function(t){var i=arguments.length<1?0:t,e=this;return e instanceof m&&(v?h((function(){g.valueOf.call(e)})):n(e)!=d)?r(new f(w(i)),e,m):w(i)};for(var b,A=e("9e1e")?l(f):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),S=0;A.length>S;S++)o(f,b=A[S])&&!o(m,b)&&p(m,b,c(f,b));m.prototype=g,g.constructor=m,e("2aba")(s,d,m)}},cde7:function(t,i,e){"use strict";var s=e("382d"),o=e.n(s);o.a},cf1c:function(t,i){t.exports="data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7"},e0a0:function(t,i,e){"use strict";e.r(i);var s=function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("div",{staticClass:"mini-im-container",class:{"mini-im-pc-container":!t.isMobile,"mini-im-container-no-pto":!t.isShowHeader}},[s("span",{directives:[{name:"show",rawName:"v-show",value:t.isMobile&&t.isInputPongIng&&!t.isShowHeader,expression:"isMobile && (isInputPongIng && !isShowHeader)"}],staticClass:"input-ing"},[t._v(t._s(t.inputPongIngString))]),t.isShowHeader?s("mt-header",{attrs:{fixed:"",title:t.isInputPongIng?t.inputPongIngString:"在线客服"}},[s("div",{attrs:{slot:"left"},slot:"left"},[s("mt-button",{attrs:{icon:"back"},on:{click:function(i){return t.$router.go(-1)}}})],1),s("mt-button",{attrs:{slot:"right"},on:{click:t.headRightBtn},slot:"right"},[t.isArtificial?s("span",[t._v("结束会话")]):s("img",{attrs:{title:"人工客服",src:"http://qiniu.cmp520.com/kefu_icon_2000.png",alt:""}})])],1):t._e(),t.isMobile?t._e():s("div",{staticClass:"mini-im-pc-header"},[t._m(0),s("span",{directives:[{name:"show",rawName:"v-show",value:t.isInputPongIng,expression:"isInputPongIng"}]},[t._v(t._s(t.inputPongIngString))]),s("div",{staticClass:"right"},[t.isArtificial?t._e():s("img",{attrs:{title:"人工客服",src:"http://qiniu.cmp520.com/kefu_icon_2000.png",alt:""},on:{click:t.headRightBtn}}),t.isArtificial?s("span",{on:{click:t.headRightBtn}},[t._v("结束会话")]):t._e(),s("div",{staticClass:"close-btn",on:{click:t.clickCloseWindow}},[t._v("ㄨ")])])]),s("div",{ref:"miniImBody",staticClass:"mini-im-body"},[s("ul",{staticClass:"mini-im-chat-list"},[t.isLoadMorLoading?s("li",{staticClass:"message-loading"},[s("mt-spinner",{attrs:{color:"#26a2ff",size:20,type:"triple-bounce"}})],1):t._e(),t._l(t.viewMessage,(function(i,e){return s("li",{key:e},[i.isShowDate?[s("div",{staticClass:"mini-im-chat-item"},[s("div",{staticClass:"chat-content"},[s("div",{staticClass:"chat-body"},[[s("div",{staticClass:"system"},[s("div",{staticClass:"content"},[s("span",[t._v(t._s(t.$formatFromNowDate(i.timestamp,"YYYY年MM月DD日 HH:mm")))])])])]],2)])])]:t._e(),s("div",{staticClass:"mini-im-chat-item",class:{self:i.from_account==t.userInfo.id}},[t.isShowInfo(i.biz_type)?s("div",{staticClass:"chat-avatar"},[s("img",{attrs:{src:i.avatar}})]):t._e(),s("div",{staticClass:"chat-content"},[s("div",{staticClass:"chat-body"},[i.isShowCancel?[i.from_account==t.userInfo.id&&t.isShowInfo(i.biz_type)?s("span",{staticClass:"cancel-btn",on:{click:function(){return t.cancelMessage(i.key)}}},[t._v("撤回")]):t._e()]:t._e(),"text"==i.biz_type||"welcome"==i.biz_type?[s("div",{staticClass:"text"},[s("span",{domProps:{innerHTML:t._s(i.payload.replace(/\n/gi,"<br />"))}})])]:t._e(),"photo"==i.biz_type?[s("div",{staticClass:"photo"},[i.percent&&100!=i.percent?s("span",[t._v("上传中"+t._s(i.percent)+"%")]):t._e(),t.isMobile?s("img",{attrs:{src:i.payload,preview:"1"}}):s("img",{attrs:{src:i.payload},on:{click:function(e){return t.clickPhoto(i.payload)}}})])]:t._e(),"knowledge"==i.biz_type?[s("div",{staticClass:"knowledge"},[s("div",{staticClass:"title"},[t._v("以下是您关心的相关问题?")]),t._l(JSON.parse(i.payload),(function(i,e){return s("a",{key:e,attrs:{href:"javascript:void(0);"},on:{click:function(){return t.sendKnowledgeMessage(i.title)}}},[s("span",[t._v("• "+t._s(i.title))])])})),s("a",{on:{click:t.headRightBtn}},[t._v("• 以上都不是?我要找人工")])],2)]:t._e(),"end"==i.biz_type?[t._m(1,!0)]:t._e(),"timeout"==i.biz_type?[s("div",{staticClass:"system"},[s("div",{staticClass:"content"},[s("span",[t._v(t._s(i.payload))])])])]:t._e(),"system"==i.biz_type?[s("div",{staticClass:"system"},[s("div",{staticClass:"content"},[s("span",{domProps:{innerHTML:t._s(i.payload)}})])])]:t._e(),"cancel"==i.biz_type?[s("div",{staticClass:"system"},[s("div",{staticClass:"content"},[i.from_account==t.userInfo.id?s("span",[t._v("您撤回了一条消息")]):s("span",[t._v("对方撤回了一条消息")])])])]:t._e(),"transfer"==i.biz_type?[s("div",{staticClass:"system"},[s("div",{staticClass:"content"},[s("span",[t._v("已为您转接"+t._s(i.transfer_account)+"号客服")])])])]:t._e()],2)])])],2)}))],2),t.isShowTopLoading?s("div",{staticClass:"top-loading"},[s("img",{attrs:{src:e("cf1c"),alt:""}}),s("span",[t._v("正在连接中~")])]):t._e()]),s("div",{directives:[{name:"show",rawName:"v-show",value:t.showEmoji,expression:"showEmoji"}],staticClass:"mini-im-emoji"},[s("div",{staticClass:"mini-im-emoji-content"},t._l(t.emojis,(function(i,e){return s("span",{key:e,on:{click:function(){return t.clickEmoji(i)}}},[t._v(t._s(i))])})),0)]),s("div",{directives:[{name:"show",rawName:"v-show",value:t.handshakeKeywordList.length>0,expression:"handshakeKeywordList.length > 0"}],staticClass:"mini-im-knowledge"},[s("div",{staticClass:"mask",on:{click:function(i){t.handshakeKeywordList=[]}}}),s("span",[t._v("以下是您关心的相关问题?")]),s("ul",t._l(t.handshakeKeywordList,(function(i,e){return s("li",{key:e,staticClass:"sendKnowledgeMessage",attrs:{data:i.title},on:{click:function(e){!t.isIOS&&t.sendKnowledgeMessage(i.title)}}},[t._v("• "+t._s(i.title))])})),0)]),s("div",{staticClass:"mini-im-tabbar-input"},[s("span",{staticClass:"photo-btn"},[s("img",{attrs:{src:e("bed0"),alt:""}}),s("input",{attrs:{onclick:"this.value = null",type:"file",accept:"image/*"},on:{change:t.sendPhotoMessageEvent}})]),s("span",{staticClass:"expression-btn",on:{click:function(i){t.showEmoji=!t.showEmoji}}},[s("img",{attrs:{src:e("21fb"),alt:""}})]),s("span",{staticClass:"workorder-btn",class:{"show-header":!t.isShowHeader&&t.isMobile},on:{click:function(i){return t.$router.push("/workorder")}}},[s("img",{attrs:{src:e("7d02")}}),s("i",[t._v("工单")])]),s("span",{directives:[{name:"show",rawName:"v-show",value:t.isMobile&&!t.isShowHeader,expression:"isMobile && !isShowHeader"}],staticClass:"serverci",class:{on:!t.isArtificial},on:{click:t.headRightBtn}},[t.isArtificial?s("span",[t._v("结束会话")]):s("img",{attrs:{title:"人工客服",src:"http://qiniu.cmp520.com/bfbfbf.png",alt:""}})]),s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.chatValue,expression:"chatValue"}],ref:"textarea",staticStyle:{"vertical-align":"top",outline:"none"},attrs:{maxlength:"200",placeholder:"请用一句话描述您的问题~"},domProps:{value:t.chatValue},on:{keyup:[function(i){return i.ctrlKey||i.shiftKey||i.altKey||i.metaKey?null:t.keyUpEvent(i)},function(i){return!i.type.indexOf("key")&&13!==i.keyCode&&t._k(i.keyCode,"enter",13,i.key,"Enter")?null:i.shiftKey?t.enterShift(i):null},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"enter",13,i.key,"Enter")||i.ctrlKey||i.shiftKey||i.altKey||i.metaKey?null:t.enterSendMessage(i)}],submit:t.sendTextMessage,focus:t.chatInputFocus,blur:t.chatInputBlur,input:function(i){i.target.composing||(t.chatValue=i.target.value)}}}),s("button",{ref:"sendButton",staticClass:"mini-input-send",attrs:{type:"button"}},[t._v("发送")])])],1)},o=[function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"title"},[e("img",{attrs:{src:"http://qiniu.cmp520.com/kefu_icon_2000.png",alt:""}}),e("span",[t._v("在线客服")])])},function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"system"},[e("div",{staticClass:"content"},[e("span",[t._v("本次会话结束,感谢您的支持!")])])])}],n=(e("8e6e"),e("ac6a"),e("456d"),e("c5f6"),e("4917"),e("7f7f"),e("bd86")),r=e("76a0");
/*!
* better-normal-scroll v1.15.2
* (c) 2016-2019 ustbhuangyi
* Released under the MIT License.
*/
function a(t,i){for(;i+1<t.length;i++)t[i]=t[i+1];t.pop()}var h=function(){function t(t,i){var e=[],s=!0,o=!1,n=void 0;try{for(var r,a=t[Symbol.iterator]();!(s=(r=a.next()).done);s=!0)if(e.push(r.value),i&&e.length===i)break}catch(h){o=!0,n=h}finally{try{!s&&a["return"]&&a["return"]()}finally{if(o)throw n}}return e}return function(i,e){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return t(i,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(t){if(Array.isArray(t)){for(var i=0,e=Array(t.length);i<t.length;i++)e[i]=t[i];return e}return Array.from(t)};function c(t){t.prototype.on=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this._events[t]||(this._events[t]=[]),this._events[t].push([i,e])},t.prototype.once=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;function s(){this.off(t,s),i.apply(e,arguments)}s.fn=i,this.on(t,s)},t.prototype.off=function(t,i){var e=this._events[t];if(e){var s=e.length;while(s--)(e[s][0]===i||e[s][0]&&e[s][0].fn===i)&&a(e,s)}},t.prototype.trigger=function(t){var i=this._events[t];if(i)for(var e=i.length,s=[].concat(l(i)),o=0;o<e;o++){var n=s[o],r=h(n,2),a=r[0],c=r[1];a&&a.apply(c,[].slice.call(arguments,1))}}}var p="undefined"!==typeof window,u=p&&navigator.userAgent.toLowerCase(),d=u&&/wechatdevtools/.test(u),m=u&&u.indexOf("android")>0;function f(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function g(t){for(var i=arguments.length,e=Array(i>1?i-1:0),s=1;s<i;s++)e[s-1]=arguments[s];for(var o=0;o<e.length;o++){var n=e[o];for(var r in n)t[r]=n[r]}return t}function v(t){return void 0===t||null===t}function y(t,i){return Math.sqrt(t*t+i*i)}var w=p&&document.createElement("div").style,b=function(){if(!p)return!1;var t={standard:"transform",webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform"};for(var i in t)if(void 0!==w[t[i]])return i;return!1}();function A(t){return!1!==b&&("standard"===b?"transitionEnd"===t?"transitionend":t:b+t.charAt(0).toUpperCase()+t.substr(1))}function S(t,i,e,s){t.addEventListener(i,e,{passive:!1,capture:!!s})}function T(t,i,e,s){t.removeEventListener(i,e,{passive:!1,capture:!!s})}function _(t){var i=0,e=0;while(t)i-=t.offsetLeft,e-=t.offsetTop,t=t.offsetParent;return{left:i,top:e}}function x(t){var i=t.getBoundingClientRect();return{left:-(i.left+window.pageXOffset),top:-(i.top+window.pageYOffset)}}var M=b&&"standard"!==b?"-"+b.toLowerCase()+"-":"",I=A("transform"),P=A("transition"),k=p&&A("perspective")in w,Y=p&&("ontouchstart"in window||d),E=!1!==I,C=p&&P in w,X={transform:I,transition:P,transitionTimingFunction:A("transitionTimingFunction"),transitionDuration:A("transitionDuration"),transitionDelay:A("transitionDelay"),transformOrigin:A("transformOrigin"),transitionEnd:A("transitionEnd")},D=1,L=2,O={touchstart:D,touchmove:D,touchend:D,mousedown:L,mousemove:L,mouseup:L};function B(t){if(t instanceof window.SVGElement){var i=t.getBoundingClientRect();return{top:i.top,left:i.left,width:i.width,height:i.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}function H(t,i){for(var e in i)if(i[e].test(t[e]))return!0;return!1}function W(t,i){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.pageX=t.pageX,e.pageY=t.pageY,t.target.dispatchEvent(e)}function z(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"click",e=void 0;"mouseup"===t.type||"mousecancel"===t.type?e=t:"touchend"!==t.type&&"touchcancel"!==t.type||(e=t.changedTouches[0]);var s={};e&&(s.screenX=e.screenX||0,s.screenY=e.screenY||0,s.clientX=e.clientX||0,s.clientY=e.clientY||0);var o=void 0,n=!0,r=!0;if("undefined"!==typeof MouseEvent)try{o=new MouseEvent(i,g({bubbles:n,cancelable:r},s))}catch(t){a()}else a();function a(){o=document.createEvent("Event"),o.initEvent(i,n,r),g(o,s)}o.forwardedTouchEvent=!0,o._constructed=!0,t.target.dispatchEvent(o)}function N(t){z(t,"dblclick")}function F(t,i){i.firstChild?R(t,i.firstChild):i.appendChild(t)}function R(t,i){i.parentNode.insertBefore(t,i)}function U(t,i){t.removeChild(i)}var V={startX:0,startY:0,scrollX:!1,scrollY:!0,freeScroll:!1,directionLockThreshold:5,eventPassthrough:"",click:!1,tap:!1,bounce:!0,bounceTime:800,momentum:!0,momentumLimitTime:300,momentumLimitDistance:15,swipeTime:2500,swipeBounceTime:500,deceleration:.0015,flickLimitTime:200,flickLimitDistance:100,resizePolling:60,probeType:0,preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:!1,disableMouse:Y,disableTouch:!Y,observeDOM:!0,autoBlur:!0,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1,mouseWheel:!1,stopPropagation:!1,zoom:!1,infinity:!1,dblclick:!1};function j(t){t.prototype._init=function(t){this._handleOptions(t),this._events={},this.x=0,this.y=0,this.directionX=0,this.directionY=0,this.setScale(1),this._addDOMEvents(),this._initExtFeatures(),this._watchTransition(),this.options.observeDOM&&this._initDOMObserver(),this.options.autoBlur&&this._handleAutoBlur(),this.refresh(),this.options.snap||this.scrollTo(this.options.startX,this.options.startY),this.enable()},t.prototype.setScale=function(t){this.lastScale=v(this.scale)?t:this.scale,this.scale=t},t.prototype._handleOptions=function(t){this.options=g({},V,t),this.translateZ=this.options.HWCompositing&&k?" translateZ(0)":"",this.options.useTransition=this.options.useTransition&&C,this.options.useTransform=this.options.useTransform&&E,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollX="horizontal"!==this.options.eventPassthrough&&this.options.scrollX,this.options.scrollY="vertical"!==this.options.eventPassthrough&&this.options.scrollY,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,!0===this.options.tap&&(this.options.tap="tap")},t.prototype._addDOMEvents=function(){var t=S;this._handleDOMEvents(t)},t.prototype._removeDOMEvents=function(){var t=T;this._handleDOMEvents(t)},t.prototype._handleDOMEvents=function(t){var i=this.options.bindToWrapper?this.wrapper:window;t(window,"orientationchange",this),t(window,"resize",this),this.options.click&&t(this.wrapper,"click",this,!0),this.options.disableMouse||(t(this.wrapper,"mousedown",this),t(i,"mousemove",this),t(i,"mousecancel",this),t(i,"mouseup",this)),Y&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(i,"touchmove",this),t(i,"touchcancel",this),t(i,"touchend",this)),t(this.scroller,X.transitionEnd,this)},t.prototype._initExtFeatures=function(){this.options.snap&&this._initSnap(),this.options.scrollbar&&this._initScrollbar(),this.options.pullUpLoad&&this._initPullUp(),this.options.pullDownRefresh&&this._initPullDown(),this.options.wheel&&this._initWheel(),this.options.mouseWheel&&this._initMouseWheel(),this.options.zoom&&this._initZoom(),this.options.infinity&&this._initInfinite()},t.prototype._watchTransition=function(){if("function"===typeof Object.defineProperty){var t=this,i=!1,e=this.options.useTransition?"isInTransition":"isAnimating";Object.defineProperty(this,e,{get:function(){return i},set:function(e){i=e;for(var s=t.scroller.children.length?t.scroller.children:[t.scroller],o=i&&!t.pulling?"none":"auto",n=0;n<s.length;n++)s[n].style.pointerEvents=o}})}},t.prototype._handleAutoBlur=function(){this.on("scrollStart",(function(){var t=document.activeElement;!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName||t.blur()}))},t.prototype._initDOMObserver=function(){var t=this;if("undefined"!==typeof MutationObserver){var i=void 0,e=new MutationObserver((function(e){if(!t._shouldNotRefresh()){for(var s=!1,o=!1,n=0;n<e.length;n++){var r=e[n];if("attributes"!==r.type){s=!0;break}if(r.target!==t.scroller){o=!0;break}}s?t.refresh():o&&(clearTimeout(i),i=setTimeout((function(){t._shouldNotRefresh()||t.refresh()}),60))}})),s={attributes:!0,childList:!0,subtree:!0};e.observe(this.scroller,s),this.on("destroy",(function(){e.disconnect()}))}else this._checkDOMUpdate()},t.prototype._shouldNotRefresh=function(){var t=this.x>this.minScrollX||this.x<this.maxScrollX||this.y>this.minScrollY||this.y<this.maxScrollY;return this.isInTransition||this.stopFromTransition||t},t.prototype._checkDOMUpdate=function(){var t=B(this.scroller),i=t.width,e=t.height;function s(){if(!this.destroyed){t=B(this.scroller);var s=t.width,n=t.height;i===s&&e===n||this.refresh(),i=s,e=n,o.call(this)}}function o(){var t=this;setTimeout((function(){s.call(t)}),1e3)}o.call(this)},t.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t),this.options.zoom&&t.touches&&t.touches.length>1&&this._zoomStart(t);break;case"touchmove":case"mousemove":this.options.zoom&&t.touches&&t.touches.length>1?this._zoom(t):this._move(t);break;case"touchend":case"mouseup":case"touchcancel":case"mousecancel":this.scaled?this._zoomEnd(t):this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"click":this.enabled&&!t._constructed&&(H(t.target,this.options.preventDefaultException)||(t.preventDefault(),t.stopPropagation()));break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._onMouseWheel(t);break}},t.prototype.refresh=function(){var t="static"===window.getComputedStyle(this.wrapper,null).position,i=B(this.wrapper);this.wrapperWidth=i.width,this.wrapperHeight=i.height;var e=B(this.scroller);this.scrollerWidth=Math.round(e.width*this.scale),this.scrollerHeight=Math.round(e.height*this.scale),this.relativeX=e.left,this.relativeY=e.top,t&&(this.relativeX-=i.left,this.relativeY-=i.top),this.minScrollX=0,this.minScrollY=0;var s=this.options.wheel;s?(this.items=this.scroller.children,this._checkWheelAllDisabled(),this.options.itemHeight=this.itemHeight=this.items.length?this.scrollerHeight/this.items.length:0,void 0===this.selectedIndex&&(this.selectedIndex=s.selectedIndex||0),this.options.startY=-this.selectedIndex*this.itemHeight,this.maxScrollX=0,this.maxScrollY=-this.itemHeight*(this.items.length-1)):(this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.options.infinity||(this.maxScrollY=this.wrapperHeight-this.scrollerHeight),this.maxScrollX<0?(this.maxScrollX-=this.relativeX,this.minScrollX=-this.relativeX):this.scale>1&&(this.maxScrollX=this.maxScrollX/2-this.relativeX,this.minScrollX=this.maxScrollX),this.maxScrollY<0?(this.maxScrollY-=this.relativeY,this.minScrollY=-this.relativeY):this.scale>1&&(this.maxScrollY=this.maxScrollY/2-this.relativeY,this.minScrollY=this.maxScrollY)),this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<this.minScrollX,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<this.minScrollY,this.hasHorizontalScroll||(this.maxScrollX=this.minScrollX,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=this.minScrollY,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=_(this.wrapper),this.trigger("refresh"),!this.scaled&&this.resetPosition()},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1}}var K={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(t){return 1+--t*t*t*t*t}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(t){return 1- --t*t*t*t}}};function Q(t,i,e,s,o,n,r,a){var h=t-i,l=Math.abs(h)/e,c=r.deceleration,p=r.itemHeight,u=r.swipeBounceTime,d=r.wheel,m=r.swipeTime,f=m,g=d?4:15,v=t+l/c*(h<0?-1:1);return d&&p&&(v=a._findNearestValidWheel(v).y),v<s?(v=n?Math.max(s-n/4,s-n/g*l):s,f=u):v>o&&(v=n?Math.min(o+n/4,o+n/g*l):o,f=u),{destination:Math.round(v),duration:f}}var G=100/60;function $(){}var q=function(){return p?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||G)/2)}:$}(),J=function(){return p?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:$}(),Z=1,tt=-1,it=1,et=-1,st=1,ot=3;function nt(t){console.error("[BScroll warn]: "+t)}function rt(t,i){if(!t)throw new Error("[BScroll] "+i)}function at(t){t.prototype._start=function(t){var i=O[t.type];if((i===D||0===t.button)&&!(!this.enabled||this.destroyed||this.initiated&&this.initiated!==i)){this.initiated=i,this.options.preventDefault&&!H(t.target,this.options.preventDefaultException)&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation(),this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.movingDirectionX=0,this.movingDirectionY=0,this.directionLocked=0,this._transitionTime(),this.startTime=f(),this.options.wheel&&(this.target=t.target),this.stop();var e=t.touches?t.touches[0]:t;this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=e.pageX,this.pointY=e.pageY,this.trigger("beforeScrollStart")}},t.prototype._move=function(t){if(this.enabled&&!this.destroyed&&O[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation();var i=t.touches?t.touches[0]:t,e=i.pageX-this.pointX,s=i.pageY-this.pointY;this.pointX=i.pageX,this.pointY=i.pageY,this.distX+=e,this.distY+=s;var o=Math.abs(this.distX),n=Math.abs(this.distY),r=f();if(!(r-this.endTime>this.options.momentumLimitTime&&!this.moved&&n<this.options.momentumLimitDistance&&o<this.options.momentumLimitDistance)){if(this.directionLocked||this.options.freeScroll||(o>n+this.options.directionLockThreshold?this.directionLocked="h":n>=o+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"===this.directionLocked){if("vertical"===this.options.eventPassthrough)t.preventDefault();else if("horizontal"===this.options.eventPassthrough)return void(this.initiated=!1);s=0}else if("v"===this.directionLocked){if("horizontal"===this.options.eventPassthrough)t.preventDefault();else if("vertical"===this.options.eventPassthrough)return void(this.initiated=!1);e=0}e=this.hasHorizontalScroll?e:0,s=this.hasVerticalScroll?s:0,this.movingDirectionX=e>0?et:e<0?it:0,this.movingDirectionY=s>0?tt:s<0?Z:0;var a=this.x+e,h=this.y+s,l=!1,c=!1,p=!1,u=!1,d=this.options.bounce;!1!==d&&(l=void 0===d.top||d.top,c=void 0===d.bottom||d.bottom,p=void 0===d.left||d.left,u=void 0===d.right||d.right),(a>this.minScrollX||a<this.maxScrollX)&&(a=a>this.minScrollX&&p||a<this.maxScrollX&&u?this.x+e/3:a>this.minScrollX?this.minScrollX:this.maxScrollX),(h>this.minScrollY||h<this.maxScrollY)&&(h=h>this.minScrollY&&l||h<this.maxScrollY&&c?this.y+s/3:h>this.minScrollY?this.minScrollY:this.maxScrollY),this.moved||(this.moved=!0,this.trigger("scrollStart")),this._translate(a,h),r-this.startTime>this.options.momentumLimitTime&&(this.startTime=r,this.startX=this.x,this.startY=this.y,this.options.probeType===st&&this.trigger("scroll",{x:this.x,y:this.y})),this.options.probeType>st&&this.trigger("scroll",{x:this.x,y:this.y});var m=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,g=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,v=this.pointX-m,y=this.pointY-g;(v>document.documentElement.clientWidth-this.options.momentumLimitDistance||v<this.options.momentumLimitDistance||y<this.options.momentumLimitDistance||y>document.documentElement.clientHeight-this.options.momentumLimitDistance)&&this._end(t)}}},t.prototype._end=function(t){if(this.enabled&&!this.destroyed&&O[t.type]===this.initiated){this.initiated=!1,this.options.preventDefault&&!H(t.target,this.options.preventDefaultException)&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation(),this.trigger("touchEnd",{x:this.x,y:this.y}),this.isInTransition=!1;var i=Math.round(this.x),e=Math.round(this.y),s=i-this.absStartX,o=e-this.absStartY;if(this.directionX=s>0?et:s<0?it:0,this.directionY=o>0?tt:o<0?Z:0,!this.options.pullDownRefresh||!this._checkPullDown())if(this._checkClick(t))this.trigger("scrollCancel");else if(!this.resetPosition(this.options.bounceTime,K.bounce)){this._translate(i,e),this.endTime=f();var n=this.endTime-this.startTime,r=Math.abs(i-this.startX),a=Math.abs(e-this.startY);if(this._events.flick&&n<this.options.flickLimitTime&&r<this.options.flickLimitDistance&&a<this.options.flickLimitDistance)this.trigger("flick");else{var h=0;if(this.options.momentum&&n<this.options.momentumLimitTime&&(a>this.options.momentumLimitDistance||r>this.options.momentumLimitDistance)){var l=!1,c=!1,p=!1,u=!1,d=this.options.bounce;!1!==d&&(l=void 0===d.top||d.top,c=void 0===d.bottom||d.bottom,p=void 0===d.left||d.left,u=void 0===d.right||d.right);var m=this.directionX===et&&p||this.directionX===it&&u?this.wrapperWidth:0,g=this.directionY===tt&&l||this.directionY===Z&&c?this.wrapperHeight:0,v=this.hasHorizontalScroll?Q(this.x,this.startX,n,this.maxScrollX,this.minScrollX,m,this.options,this):{destination:i,duration:0},y=this.hasVerticalScroll?Q(this.y,this.startY,n,this.maxScrollY,this.minScrollY,g,this.options,this):{destination:e,duration:0};i=v.destination,e=y.destination,h=Math.max(v.duration,y.duration),this.isInTransition=!0}else this.options.wheel&&(e=this._findNearestValidWheel(e).y,h=this.options.wheel.adjustTime||400);var w=K.swipe;if(this.options.snap){var b=this._nearestSnap(i,e);this.currentPage=b,h=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(i-b.x),1e3),Math.min(Math.abs(e-b.y),1e3)),300),i=b.x,e=b.y,this.directionX=0,this.directionY=0,w=this.options.snap.easing||K.bounce}if(i!==this.x||e!==this.y)return(i>this.minScrollX||i<this.maxScrollX||e>this.minScrollY||e<this.maxScrollY)&&(w=K.swipeBounce),void this.scrollTo(i,e,h,w);this.options.wheel&&(this.selectedIndex=this._findNearestValidWheel(this.y).index),this.trigger("scrollEnd",{x:this.x,y:this.y})}}}},t.prototype._checkClick=function(t){var i=this.stopFromTransition&&!this.pulling;if(this.stopFromTransition=!1,!this.moved){if(this.options.wheel){if(this.target&&this.target.className===this.options.wheel.wheelWrapperClass){var e=this._findNearestValidWheel(this.y).index,s=Math.round((this.pointY+x(this.wrapper).top-this.wrapperHeight/2)/this.itemHeight);this.target=this.items[e+s]}var o=_(this.target).top,n=_(this.target).left;return o-=this.wrapperOffset.top,o-=Math.round(this.target.offsetHeight/2-this.wrapper.offsetHeight/2)||0,n-=this.wrapperOffset.left,n-=Math.round(this.target.offsetWidth/2-this.wrapper.offsetWidth/2)||0,o=this._findNearestValidWheel(o).y,this.scrollTo(n,o,this.options.wheel.adjustTime||400,K.swipe),!0}if(!i){var r=this.options.dblclick,a=!1;if(r&&this.lastClickTime){var h=r.delay,l=void 0===h?300:h;f()-this.lastClickTime<l&&(a=!0,N(t))}return this.options.tap&&W(t,this.options.tap),this.options.click&&!H(t.target,this.options.preventDefaultException)&&z(t),this.lastClickTime=a?null:f(),!0}return!1}return!1},t.prototype._resize=function(){var t=this;this.enabled&&(m&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){t.refresh()}),this.options.resizePolling))},t.prototype._startProbe=function(){J(this.probeTimer),this.probeTimer=q(i);var t=this;function i(){var e=t.getComputedPosition();t.trigger("scroll",e),t.isInTransition?t.probeTimer=q(i):t.trigger("scrollEnd",e)}},t.prototype._transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.scrollerStyle[X.transitionDuration]=t+"ms",this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[X.transitionDuration]=t+"ms";if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTime(t)},t.prototype._transitionTimingFunction=function(t){if(this.scrollerStyle[X.transitionTimingFunction]=t,this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[X.transitionTimingFunction]=t;if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTimingFunction(t)},t.prototype._transitionEnd=function(t){if(t.target===this.scroller&&this.isInTransition){this._transitionTime();var i=!this.pulling||this.movingDirectionY===Z;i&&!this.resetPosition(this.options.bounceTime,K.bounce)&&(this.isInTransition=!1,this.options.probeType!==ot&&this.trigger("scrollEnd",{x:this.x,y:this.y}))}},t.prototype._translate=function(t,i,e){if(rt(!v(t)&&!v(i),"Translate x or y is null or undefined."),v(e)&&(e=this.scale),this.options.useTransform?this.scrollerStyle[X.transform]="translate("+t+"px,"+i+"px) scale("+e+")"+this.translateZ:(t=Math.round(t),i=Math.round(i),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=i+"px"),this.options.wheel)for(var s=this.options.wheel.rotate,o=void 0===s?25:s,n=0;n<this.items.length;n++){var r=o*(i/this.itemHeight+n);this.items[n].style[X.transform]="rotateX("+r+"deg)"}if(this.x=t,this.y=i,this.setScale(e),this.indicators)for(var a=0;a<this.indicators.length;a++)this.indicators[a].updatePosition()},t.prototype._animate=function(t,i,e,s){var o=this,n=this.x,r=this.y,a=this.lastScale,h=this.scale,l=f(),c=l+e;function p(){var u=f();if(u>=c)return o.isAnimating=!1,o._translate(t,i,h),o.trigger("scroll",{x:o.x,y:o.y}),void(o.pulling||o.resetPosition(o.options.bounceTime)||o.trigger("scrollEnd",{x:o.x,y:o.y}));u=(u-l)/e;var d=s(u),m=(t-n)*d+n,g=(i-r)*d+r,v=(h-a)*d+a;o._translate(m,g,v),o.isAnimating&&(o.animateTimer=q(p)),o.options.probeType===ot&&o.trigger("scroll",{x:o.x,y:o.y})}this.isAnimating=!0,J(this.animateTimer),p()},t.prototype.scrollBy=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:K.bounce;t=this.x+t,i=this.y+i,this.scrollTo(t,i,e,s)},t.prototype.scrollTo=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:K.bounce,o=arguments[4];if(this.options.wheel&&(i=this._findNearestValidWheel(i).y),t!==this.x||i!==this.y)if(this.isInTransition=this.options.useTransition&&e>0&&(this.x!==t||this.y!==i),!e||this.options.useTransition){if(this._transitionTimingFunction(s.style),this._transitionTime(e),this._translate(t,i),e&&this.options.probeType===ot&&this._startProbe(),!e&&!o){if(this.options.zoom)return;this.trigger("scroll",{x:t,y:i}),this._reflow=document.body.offsetHeight,this.resetPosition(this.options.bounceTime,K.bounce)||this.trigger("scrollEnd",{x:t,y:i})}this.options.wheel&&(this.selectedIndex=this._findNearestValidWheel(i).index)}else this._animate(t,i,e,s.fn)},t.prototype.scrollToElement=function(t,i,e,s,o){if(t&&(t=t.nodeType?t:this.scroller.querySelector(t),!this.options.wheel||t.classList.contains(this.options.wheel.wheelItemClass))){var n=_(t);n.left-=this.wrapperOffset.left,n.top-=this.wrapperOffset.top,!0===e&&(e=Math.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===s&&(s=Math.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),n.left-=e||0,n.top-=s||0,n.left=n.left>this.minScrollX?this.minScrollX:n.left<this.maxScrollX?this.maxScrollX:n.left,n.top=n.top>this.minScrollY?this.minScrollY:n.top<this.maxScrollY?this.maxScrollY:n.top,this.options.wheel&&(n.top=this._findNearestValidWheel(n.top).y),this.scrollTo(n.left,n.top,i,o)}},t.prototype.resetPosition=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K.bounce,e=this.x,s=Math.round(e);!this.hasHorizontalScroll||s>this.minScrollX?e=this.minScrollX:s<this.maxScrollX&&(e=this.maxScrollX);var o=this.y,n=Math.round(o);return!this.hasVerticalScroll||n>this.minScrollY?o=this.minScrollY:n<this.maxScrollY&&(o=this.maxScrollY),(e!==this.x||o!==this.y)&&(this.scrollTo(e,o,t,i),!0)},t.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.scroller,null),i=void 0,e=void 0;return this.options.useTransform?(t=t[X.transform].split(")")[0].split(", "),i=+(t[12]||t[4]),e=+(t[13]||t[5])):(i=+t.left.replace(/[^-\d.]/g,""),e=+t.top.replace(/[^-\d.]/g,"")),{x:i,y:e}},t.prototype.stop=function(){if(this.options.useTransition&&this.isInTransition){this.isInTransition=!1,J(this.probeTimer);var t=this.getComputedPosition();this._translate(t.x,t.y),this.options.wheel?this.target=this.items[this._findNearestValidWheel(t.y).index]:this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0}else!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,J(this.animateTimer),this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0)},t.prototype.destroy=function(){this.destroyed=!0,this.trigger("destroy"),this.options.useTransition?J(this.probeTimer):J(this.animateTimer),this._removeDOMEvents(),this._events={}}}function ht(t){t.prototype._initSnap=function(){var t=this;this.currentPage={};var i=this.options.snap;if(i.loop){var e=this.scroller.children;e.length>1?(F(e[e.length-1].cloneNode(!0),this.scroller),this.scroller.appendChild(e[1].cloneNode(!0))):i.loop=!1}var s=i.el;"string"===typeof s&&(s=this.scroller.querySelectorAll(s)),this.on("refresh",(function(){if(t.pages=[],t.wrapperWidth&&t.wrapperHeight&&t.scrollerWidth&&t.scrollerHeight){var e=i.stepX||t.wrapperWidth,o=i.stepY||t.wrapperHeight,n=0,r=void 0,a=void 0,h=void 0,l=0,c=void 0,p=0,u=void 0,d=void 0;if(s)for(c=s.length,u=-1;l<c;l++)d=B(s[l]),(0===l||d.left<=B(s[l-1]).left)&&(p=0,u++),t.pages[p]||(t.pages[p]=[]),n=Math.max(-d.left,t.maxScrollX),r=Math.max(-d.top,t.maxScrollY),a=n-Math.round(d.width/2),h=r-Math.round(d.height/2),t.pages[p][u]={x:n,y:r,width:d.width,height:d.height,cx:a,cy:h},n>t.maxScrollX&&p++;else{a=Math.round(e/2),h=Math.round(o/2);while(n>-t.scrollerWidth){t.pages[l]=[],c=0,r=0;while(r>-t.scrollerHeight)t.pages[l][c]={x:Math.max(n,t.maxScrollX),y:Math.max(r,t.maxScrollY),width:e,height:o,cx:n-a,cy:r-h},r-=o,c++;n-=e,l++}}t._checkSnapLoop();var m=i._loopX?1:0,f=i._loopY?1:0;t._goToPage(t.currentPage.pageX||m,t.currentPage.pageY||f,0,void 0,!0);var g=i.threshold;g%1===0?(t.snapThresholdX=g,t.snapThresholdY=g):(t.snapThresholdX=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].width*g),t.snapThresholdY=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].height*g))}})),this.on("scrollEnd",(function(){i.loop&&(i._loopX?(0===t.currentPage.pageX&&t._goToPage(t.pages.length-2,t.currentPage.pageY,0,void 0,!0),t.currentPage.pageX===t.pages.length-1&&t._goToPage(1,t.currentPage.pageY,0,void 0,!0)):(0===t.currentPage.pageY&&t._goToPage(t.currentPage.pageX,t.pages[0].length-2,0,void 0,!0),t.currentPage.pageY===t.pages[0].length-1&&t._goToPage(t.currentPage.pageX,1,0,void 0,!0)))})),!1!==i.listenFlick&&this.on("flick",(function(){var e=i.speed||Math.max(Math.max(Math.min(Math.abs(t.x-t.startX),1e3),Math.min(Math.abs(t.y-t.startY),1e3)),300);t._goToPage(t.currentPage.pageX+t.directionX,t.currentPage.pageY+t.directionY,e)})),this.on("destroy",(function(){if(i.loop){var e=t.scroller.children;e.length>2&&(U(t.scroller,e[e.length-1]),U(t.scroller,e[0]))}}))},t.prototype._checkSnapLoop=function(){var t=this.options.snap;t.loop&&this.pages&&this.pages.length&&(this.pages.length>1&&(t._loopX=!0),this.pages[0]&&this.pages[0].length>1&&(t._loopY=!0),t._loopX&&t._loopY&&nt("Loop does not support two direction at the same time."))},t.prototype._nearestSnap=function(t,i){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var e=0;if(Math.abs(t-this.absStartX)<=this.snapThresholdX&&Math.abs(i-this.absStartY)<=this.snapThresholdY)return this.currentPage;t>this.minScrollX?t=this.minScrollX:t<this.maxScrollX&&(t=this.maxScrollX),i>this.minScrollY?i=this.minScrollY:i<this.maxScrollY&&(i=this.maxScrollY);for(var s=this.pages.length;e<s;e++)if(t>=this.pages[e][0].cx){t=this.pages[e][0].x;break}s=this.pages[e].length;for(var o=0;o<s;o++)if(i>=this.pages[0][o].cy){i=this.pages[0][o].y;break}return e===this.currentPage.pageX&&(e+=this.directionX,e<0?e=0:e>=this.pages.length&&(e=this.pages.length-1),t=this.pages[e][0].x),o===this.currentPage.pageY&&(o+=this.directionY,o<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),i=this.pages[0][o].y),{x:t,y:i,pageX:e,pageY:o}},t.prototype._goToPage=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments[2],s=arguments[3],o=arguments[4],n=this.options.snap;if(n&&this.pages&&this.pages.length&&(s=s||n.easing||K.bounce,t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),this.pages[t])){i>=this.pages[t].length?i=this.pages[t].length-1:i<0&&(i=0);var r=this.pages[t][i].x,a=this.pages[t][i].y;e=void 0===e?n.speed||Math.max(Math.max(Math.min(Math.abs(r-this.x),1e3),Math.min(Math.abs(a-this.y),1e3)),300):e,this.currentPage={x:r,y:a,pageX:t,pageY:i},this.scrollTo(r,a,e,s,o)}},t.prototype.goToPage=function(t,i,e,s){var o=this.options.snap;if(o&&this.pages&&this.pages.length){if(o.loop){var n=void 0;o._loopX?(n=this.pages.length-2,t>=n?t=n-1:t<0&&(t=0),t+=1):(n=this.pages[0].length-2,i>=n?i=n-1:i<0&&(i=0),i+=1)}this._goToPage(t,i,e,s)}},t.prototype.next=function(t,i){var e=this.options.snap;if(e){var s=this.currentPage.pageX,o=this.currentPage.pageY;s++,s>=this.pages.length&&this.hasVerticalScroll&&(s=0,o++),this._goToPage(s,o,t,i)}},t.prototype.prev=function(t,i){var e=this.options.snap;if(e){var s=this.currentPage.pageX,o=this.currentPage.pageY;s--,s<0&&this.hasVerticalScroll&&(s=0,o--),this._goToPage(s,o,t,i)}},t.prototype.getCurrentPage=function(){var t=this.options.snap;if(!t)return null;if(t.loop){var i=void 0;return i=t._loopX?g({},this.currentPage,{pageX:this.currentPage.pageX-1}):g({},this.currentPage,{pageY:this.currentPage.pageY-1}),i}return this.currentPage}}function lt(t){t.prototype.wheelTo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.options.wheel){var i=-t*this.itemHeight;this.scrollTo(0,i)}},t.prototype.getSelectedIndex=function(){return this.options.wheel&&this.selectedIndex},t.prototype._initWheel=function(){var t=this.options.wheel;t.wheelWrapperClass||(t.wheelWrapperClass="wheel-scroll"),t.wheelItemClass||(t.wheelItemClass="wheel-item"),t.wheelDisabledItemClass||(t.wheelDisabledItemClass="wheel-disabled-item"),void 0===t.selectedIndex&&(t.selectedIndex=0)},t.prototype._findNearestValidWheel=function(t){t=t>0?0:t<this.maxScrollY?this.maxScrollY:t;var i=this.options.wheel,e=Math.abs(Math.round(-t/this.itemHeight)),s=e,o=this.items;while(e>=0){if(-1===o[e].className.indexOf(i.wheelDisabledItemClass))break;e--}if(e<0){e=s;while(e<=o.length-1){if(-1===o[e].className.indexOf(i.wheelDisabledItemClass))break;e++}}return e===o.length&&(e=s),{index:this.wheelItemsAllDisabled?-1:e,y:-e*this.itemHeight}},t.prototype._checkWheelAllDisabled=function(){var t=this.options.wheel,i=this.items;this.wheelItemsAllDisabled=!0;for(var e=0;e<i.length;e++)if(-1===i[e].className.indexOf(t.wheelDisabledItemClass)){this.wheelItemsAllDisabled=!1;break}}}var ct=8;function pt(t){t.prototype._initScrollbar=function(){var t=this,i=this.options.scrollbar,e=i.fade,s=void 0===e||e,o=i.interactive,n=void 0!==o&&o;this.indicators=[];var r=void 0;this.options.scrollX&&(r={el:ut("horizontal"),direction:"horizontal",fade:s,interactive:n},this._insertScrollBar(r.el),this.indicators.push(new dt(this,r))),this.options.scrollY&&(r={el:ut("vertical"),direction:"vertical",fade:s,interactive:n},this._insertScrollBar(r.el),this.indicators.push(new dt(this,r))),this.on("refresh",(function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].refresh()})),s&&(this.on("scrollEnd",(function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade()})),this.on("scrollCancel",(function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade()})),this.on("scrollStart",(function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade(!0)})),this.on("beforeScrollStart",(function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade(!0,!0)}))),this.on("destroy",(function(){t._removeScrollBars()}))},t.prototype._insertScrollBar=function(t){this.wrapper.appendChild(t)},t.prototype._removeScrollBars=function(){for(var t=0;t<this.indicators.length;t++)this.indicators[t].destroy()}}function ut(t){var i=document.createElement("div"),e=document.createElement("div");return i.style.cssText="position:absolute;z-index:9999;pointerEvents:none",e.style.cssText="box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px;",e.className="bscroll-indicator","horizontal"===t?(i.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",e.style.height="100%",i.className="bscroll-horizontal-scrollbar"):(i.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",e.style.width="100%",i.className="bscroll-vertical-scrollbar"),i.style.cssText+=";overflow:hidden",i.appendChild(e),i}function dt(t,i){this.wrapper=i.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=t,this.direction=i.direction,i.fade?(this.visible=0,this.wrapperStyle.opacity="0"):this.visible=1,this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.x=0,this.y=0,i.interactive&&this._addDOMEvents()}function mt(t){t.prototype._initPullDown=function(){this.options.probeType=ot},t.prototype._checkPullDown=function(){var t=this.options.pullDownRefresh,i=t.threshold,e=void 0===i?90:i,s=t.stop,o=void 0===s?40:s;return!(this.directionY!==tt||this.y<e)&&(this.pulling||(this.pulling=!0,this.trigger("pullingDown")),this.scrollTo(this.x,o,this.options.bounceTime,K.bounce),this.pulling)},t.prototype.finishPullDown=function(){this.pulling=!1,this.resetPosition(this.options.bounceTime,K.bounce)},t.prototype.openPullDown=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.pullDownRefresh=t,this._initPullDown()},t.prototype.closePullDown=function(){this.options.pullDownRefresh=!1},t.prototype.autoPullDownRefresh=function(){var t=this.options.pullDownRefresh,i=t.threshold,e=void 0===i?90:i,s=t.stop,o=void 0===s?40:s;this.pulling||(this.pulling=!0,this.scrollTo(this.x,e),this.trigger("pullingDown"),this.scrollTo(this.x,o,this.options.bounceTime,K.bounce))}}function ft(t){t.prototype._initPullUp=function(){this.options.probeType=ot,this.pullupWatching=!1,this._watchPullUp()},t.prototype._watchPullUp=function(){this.pullupWatching||(this.pullupWatching=!0,this.on("scroll",this._checkToEnd))},t.prototype._checkToEnd=function(t){var i=this,e=this.options.pullUpLoad.threshold,s=void 0===e?0:e;this.movingDirectionY===Z&&t.y<=this.maxScrollY+s&&(this.once("scrollEnd",(function(){i.pullupWatching=!1})),this.trigger("pullingUp"),this.off("scroll",this._checkToEnd))},t.prototype.finishPullUp=function(){var t=this;this.pullupWatching?this.once("scrollEnd",(function(){t._watchPullUp()})):this._watchPullUp()},t.prototype.openPullUp=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.pullUpLoad=t,this._initPullUp()},t.prototype.closePullUp=function(){this.options.pullUpLoad=!1,this.pullupWatching&&(this.pullupWatching=!1,this.off("scroll",this._checkToEnd))}}function gt(t){t.prototype._initMouseWheel=function(){var t=this;this._handleMouseWheelEvent(S),this.on("destroy",(function(){clearTimeout(t.mouseWheelTimer),clearTimeout(t.mouseWheelEndTimer),t._handleMouseWheelEvent(T)})),this.firstWheelOpreation=!0},t.prototype._handleMouseWheelEvent=function(t){t(this.wrapper,"wheel",this),t(this.wrapper,"mousewheel",this),t(this.wrapper,"DOMMouseScroll",this)},t.prototype._onMouseWheel=function(t){var i=this;if(this.enabled){t.preventDefault(),this.options.stopPropagation&&t.stopPropagation(),this.firstWheelOpreation&&this.trigger("scrollStart"),this.firstWheelOpreation=!1;var e=this.options.mouseWheel,s=e.speed,o=void 0===s?20:s,n=e.invert,r=void 0!==n&&n,a=e.easeTime,h=void 0===a?300:a;clearTimeout(this.mouseWheelTimer),this.mouseWheelTimer=setTimeout((function(){i.options.snap||h||i.trigger("scrollEnd",{x:i.x,y:i.y}),i.firstWheelOpreation=!0}),400);var l=void 0,c=void 0;switch(!0){case"deltaX"in t:1===t.deltaMode?(l=-t.deltaX*o,c=-t.deltaY*o):(l=-t.deltaX,c=-t.deltaY);break;case"wheelDeltaX"in t:l=t.wheelDeltaX/120*o,c=t.wheelDeltaY/120*o;break;case"wheelDelta"in t:l=c=t.wheelDelta/120*o;break;case"detail"in t:l=c=-t.detail/3*o;break;default:return}var p=r?-1:1;l*=p,c*=p,this.hasVerticalScroll||(l=c,c=0);var u=void 0,d=void 0;if(this.options.snap)return u=this.currentPage.pageX,d=this.currentPage.pageY,l>0?u--:l<0&&u++,c>0?d--:c<0&&d++,void this._goToPage(u,d);u=this.x+Math.round(this.hasHorizontalScroll?l:0),d=this.y+Math.round(this.hasVerticalScroll?c:0),this.movingDirectionX=this.directionX=l>0?-1:l<0?1:0,this.movingDirectionY=this.directionY=c>0?-1:c<0?1:0,u>this.minScrollX?u=this.minScrollX:u<this.maxScrollX&&(u=this.maxScrollX),d>this.minScrollY?d=this.minScrollY:d<this.maxScrollY&&(d=this.maxScrollY);var m=this.y===d;this.scrollTo(u,d,h,K.swipe),this.trigger("scroll",{x:this.x,y:this.y}),clearTimeout(this.mouseWheelEndTimer),m&&(this.mouseWheelEndTimer=setTimeout((function(){i.trigger("scrollEnd",{x:i.x,y:i.y})}),h))}}}function vt(t){t.prototype._initZoom=function(){var t=this.options.zoom,i=t.start,e=void 0===i?1:i,s=t.min,o=void 0===s?1:s,n=t.max,r=void 0===n?4:n;this.scale=Math.min(Math.max(e,o),r),this.setScale(this.scale),this.scrollerStyle[X.transformOrigin]="0 0"},t.prototype._zoomTo=function(t,i,e,s){this.scaled=!0;var o=t/(s||this.scale);this.setScale(t),this.refresh();var n=Math.round(this.startX-(i-this.relativeX)*(o-1)),r=Math.round(this.startY-(e-this.relativeY)*(o-1));n>this.minScrollX?n=this.minScrollX:n<this.maxScrollX&&(n=this.maxScrollX),r>this.minScrollY?r=this.minScrollY:r<this.maxScrollY&&(r=this.maxScrollY),this.x===n&&this.y===r||this.scrollTo(n,r,this.options.bounceTime),this.scaled=!1},t.prototype.zoomTo=function(t,i,e){var s=x(this.wrapper),o=s.left,n=s.top,r=i+o-this.x,a=e+n-this.y;this._zoomTo(t,r,a)},t.prototype._zoomStart=function(t){var i=t.touches[0],e=t.touches[1],s=Math.abs(i.pageX-e.pageX),o=Math.abs(i.pageY-e.pageY);this.startDistance=y(s,o),this.startScale=this.scale;var n=x(this.wrapper),r=n.left,a=n.top;this.originX=Math.abs(i.pageX+e.pageX)/2+r-this.x,this.originY=Math.abs(i.pageY+e.pageY)/2+a-this.y,this.trigger("zoomStart")},t.prototype._zoom=function(t){if(this.enabled&&!this.destroyed&&O[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation();var i=t.touches[0],e=t.touches[1],s=Math.abs(i.pageX-e.pageX),o=Math.abs(i.pageY-e.pageY),n=y(s,o),r=n/this.startDistance*this.startScale;this.scaled=!0;var a=this.options.zoom,h=a.min,l=void 0===h?1:h,c=a.max,p=void 0===c?4:c;r<l?r=.5*l*Math.pow(2,r/l):r>p&&(r=2*p*Math.pow(.5,p/r));var u=r/this.startScale,d=this.startX-(this.originX-this.relativeX)*(u-1),m=this.startY-(this.originY-this.relativeY)*(u-1);this.setScale(r),this.scrollTo(d,m,0)}},t.prototype._zoomEnd=function(t){if(this.enabled&&!this.destroyed&&O[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation(),this.isInTransition=!1,this.isAnimating=!1,this.initiated=0;var i=this.options.zoom,e=i.min,s=void 0===e?1:e,o=i.max,n=void 0===o?4:o,r=this.scale>n?n:this.scale<s?s:this.scale;this._zoomTo(r,this.originX,this.originY,this.startScale),this.trigger("zoomEnd")}}}dt.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t);break;case"touchmove":case"mousemove":this._move(t);break;case"touchend":case"mouseup":case"touchcancel":case"mousecancel":this._end(t);break}},dt.prototype.refresh=function(){this._shouldShow()&&(this.transitionTime(),this._calculate(),this.updatePosition())},dt.prototype.fade=function(t,i){var e=this;if(!i||this.visible){var s=t?250:500;t=t?"1":"0",this.wrapperStyle[X.transitionDuration]=s+"ms",clearTimeout(this.fadeTimeout),this.fadeTimeout=setTimeout((function(){e.wrapperStyle.opacity=t,e.visible=+t}),0)}},dt.prototype.updatePosition=function(){if("vertical"===this.direction){var t=Math.round(this.sizeRatioY*this.scroller.y);if(t<0){this.transitionTime(500);var i=Math.max(this.indicatorHeight+3*t,ct);this.indicatorStyle.height=i+"px",t=0}else if(t>this.maxPosY){this.transitionTime(500);var e=Math.max(this.indicatorHeight-3*(t-this.maxPosY),ct);this.indicatorStyle.height=e+"px",t=this.maxPosY+this.indicatorHeight-e}else this.indicatorStyle.height=this.indicatorHeight+"px";this.y=t,this.scroller.options.useTransform?this.indicatorStyle[X.transform]="translateY("+t+"px)"+this.scroller.translateZ:this.indicatorStyle.top=t+"px"}else{var s=Math.round(this.sizeRatioX*this.scroller.x);if(s<0){this.transitionTime(500);var o=Math.max(this.indicatorWidth+3*s,ct);this.indicatorStyle.width=o+"px",s=0}else if(s>this.maxPosX){this.transitionTime(500);var n=Math.max(this.indicatorWidth-3*(s-this.maxPosX),ct);this.indicatorStyle.width=n+"px",s=this.maxPosX+this.indicatorWidth-n}else this.indicatorStyle.width=this.indicatorWidth+"px";this.x=s,this.scroller.options.useTransform?this.indicatorStyle[X.transform]="translateX("+s+"px)"+this.scroller.translateZ:this.indicatorStyle.left=s+"px"}},dt.prototype.transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.indicatorStyle[X.transitionDuration]=t+"ms"},dt.prototype.transitionTimingFunction=function(t){this.indicatorStyle[X.transitionTimingFunction]=t},dt.prototype.destroy=function(){this._removeDOMEvents(),this.wrapper.parentNode.removeChild(this.wrapper)},dt.prototype._start=function(t){var i=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=i.pageX,this.lastPointY=i.pageY,this.startTime=f(),this._handleMoveEvents(S),this.scroller.trigger("beforeScrollStart")},dt.prototype._move=function(t){var i=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.moved||this.scroller.trigger("scrollStart"),this.moved=!0;var e=i.pageX-this.lastPointX;this.lastPointX=i.pageX;var s=i.pageY-this.lastPointY;this.lastPointY=i.pageY;var o=this.x+e,n=this.y+s;this._pos(o,n)},dt.prototype._end=function(t){if(this.initiated){this.initiated=!1,t.preventDefault(),t.stopPropagation(),this._handleMoveEvents(T);var i=this.scroller.options.snap;if(i){var e=i.speed,s=i.easing,o=void 0===s?K.bounce:s,n=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),r=e||Math.max(Math.max(Math.min(Math.abs(this.scroller.x-n.x),1e3),Math.min(Math.abs(this.scroller.y-n.y),1e3)),300);this.scroller.x===n.x&&this.scroller.y===n.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=n,this.scroller.scrollTo(n.x,n.y,r,o))}this.moved&&this.scroller.trigger("scrollEnd",{x:this.scroller.x,y:this.scroller.y})}},dt.prototype._pos=function(t,i){t<0?t=0:t>this.maxPosX&&(t=this.maxPosX),i<0?i=0:i>this.maxPosY&&(i=this.maxPosY),t=Math.round(t/this.sizeRatioX),i=Math.round(i/this.sizeRatioY),this.scroller.scrollTo(t,i),this.scroller.trigger("scroll",{x:this.scroller.x,y:this.scroller.y})},dt.prototype._shouldShow=function(){return"vertical"===this.direction&&this.scroller.hasVerticalScroll||"horizontal"===this.direction&&this.scroller.hasHorizontalScroll?(this.wrapper.style.display="",!0):(this.wrapper.style.display="none",!1)},dt.prototype._calculate=function(){if("vertical"===this.direction){var t=this.wrapper.clientHeight;this.indicatorHeight=Math.max(Math.round(t*t/(this.scroller.scrollerHeight||t||1)),ct),this.indicatorStyle.height=this.indicatorHeight+"px",this.maxPosY=t-this.indicatorHeight,this.sizeRatioY=this.maxPosY/this.scroller.maxScrollY}else{var i=this.wrapper.clientWidth;this.indicatorWidth=Math.max(Math.round(i*i/(this.scroller.scrollerWidth||i||1)),ct),this.indicatorStyle.width=this.indicatorWidth+"px",this.maxPosX=i-this.indicatorWidth,this.sizeRatioX=this.maxPosX/this.scroller.maxScrollX}},dt.prototype._addDOMEvents=function(){var t=S;this._handleDOMEvents(t)},dt.prototype._removeDOMEvents=function(){var t=T;this._handleDOMEvents(t),this._handleMoveEvents(t)},dt.prototype._handleMoveEvents=function(t){this.scroller.options.disableTouch||t(window,"touchmove",this),this.scroller.options.disableMouse||t(window,"mousemove",this)},dt.prototype._handleDOMEvents=function(t){this.scroller.options.disableTouch||(t(this.indicator,"touchstart",this),t(window,"touchend",this)),this.scroller.options.disableMouse||(t(this.indicator,"mousedown",this),t(window,"mouseup",this))};var yt=30,wt=10,bt=200,At=2e3;function St(t){t.prototype._initInfinite=function(){this.options.probeType=3,this.maxScrollY=-At,this.infiniteScroller=new _t(this,this.options.infinity)}}function Tt(t){if(t&&t.classList)return t.classList.contains("tombstone")}function _t(t,i){var e=this;this.options=i,rt("function"===typeof this.options.createTombstone,"Infinite scroll need createTombstone Function to create tombstone"),rt("function"===typeof this.options.fetch,"Infinite scroll need fetch Function to fetch new data."),rt("function"===typeof this.options.render,"Infinite scroll need render Function to render each item."),this.firstAttachedItem=0,this.lastAttachedItem=0,this.anchorScrollTop=0,this.anchorItem={index:0,offset:0},this.tombstoneHeight=0,this.tombstoneWidth=0,this.tombstones=[],this.tombstonesAnimationHandlers=[],this.items=[],this.loadedItems=0,this.requestInProgress=!1,this.hasMore=!0,this.scroller=t,this.wrapperEl=this.scroller.wrapper,this.scrollerEl=this.scroller.scroller,this.scroller.on("resize",(function(){e.onResize()})),this.scroller.on("destroy",(function(){e.destroy()})),this._onResizeHandler=setTimeout((function(){e.onResize(),e.scroller.on("scroll",(function(){e.onScroll()}))}))}function xt(t,i){this.wrapper="string"===typeof t?document.querySelector(t):t,this.wrapper||nt("Can not resolve the wrapper DOM."),this.scroller=this.wrapper.children[0],this.scroller||nt("The wrapper need at least one child element to be scroller."),this.scrollerStyle=this.scroller.style,this._init(i)}_t.prototype.destroy=function(){var t=this;clearTimeout(this._onResizeHandler),this.tombstonesAnimationHandlers.forEach((function(t){clearTimeout(t)})),this.tombstonesAnimationHandlers=null,this.items.forEach((function(i){i.node&&(t.scrollerEl.removeChild(i.node),i.node=null)})),this.scroller.infiniteScroller=null,this.scroller=null,this.wrapperEl=null,this.scrollerEl=null,this.items=null,this.tombstones=null},_t.prototype.onScroll=function(){var t=-this.scroller.y,i=t-this.anchorScrollTop;this.anchorItem=0===t?{index:0,offset:0}:this._calculateAnchoredItem(this.anchorItem,i),this.anchorScrollTop=t;var e=this._calculateAnchoredItem(this.anchorItem,this.scroller.wrapperHeight),s=this.anchorItem.index,o=e.index;i<0?(s-=yt,o+=wt):(s-=wt,o+=yt),this.fill(s,o),this.maybeRequestContent()},_t.prototype.onResize=function(){var t=this.options.createTombstone();t.style.position="absolute",this.scrollerEl.appendChild(t),t.style.display="",this.tombstoneHeight=t.offsetHeight,this.tombstoneWidth=t.offsetWidth,this.scrollerEl.removeChild(t);for(var i=0;i<this.items.length;i++)this.items[i].height=this.items[i].width=0;this.onScroll()},_t.prototype.fill=function(t,i){this.firstAttachedItem=Math.max(0,t),this.hasMore||(i=Math.min(i,this.items.length)),this.lastAttachedItem=i,this.attachContent()},_t.prototype.maybeRequestContent=function(){var t=this;if(!this.requestInProgress&&this.hasMore){var i=this.lastAttachedItem-this.loadedItems;i<=0||(this.requestInProgress=!0,this.options.fetch(i).then((function(i){if(t.requestInProgress=!1,i)t.addContent(i);else{t.hasMore=!1;var e=t._removeTombstones(),s=0;t.anchorItem.index<=t.items.length?(s=t._fixScrollPosition(),t._setupAnimations({},s),t.scroller.resetPosition(t.scroller.options.bounceTime)):(t.anchorItem.index-=e,s=t._fixScrollPosition(),t._setupAnimations({},s),t.scroller.stop(),t.scroller.resetPosition(),t.onScroll())}})))}},_t.prototype.addContent=function(t){for(var i=0;i<t.length;i++)this.items.length<=this.loadedItems&&this._addItem(),this.items[this.loadedItems++].data=t[i];this.attachContent(),this.maybeRequestContent()},_t.prototype.attachContent=function(){var t=this._collectUnusedNodes(),i=this._createDOMNodes(t);this._cleanupUnusedNodes(t),this._cacheNodeSize();var e=this._fixScrollPosition();this._setupAnimations(i,e)},_t.prototype.resetMore=function(){this.hasMore=!0},_t.prototype._removeTombstones=function(){for(var t=void 0,i=0,e=this.items.length,s=0;s<e;s++){var o=this.items[s].node,n=this.items[s].data;o&&!Tt(o)||n||(void 0===t&&(t=s),o&&this.scrollerEl.removeChild(o))}return i=e-t,this.items.splice(t),this.lastAttachedItem=Math.min(this.lastAttachedItem,this.items.length),i},_t.prototype._collectUnusedNodes=function(){for(var t=[],i=0;i<this.items.length;i++)if(i!==this.firstAttachedItem){var e=this.items[i].node;e&&(Tt(e)?(this.tombstones.push(e),this.tombstones[this.tombstones.length-1].style.display="none"):t.push(e)),this.items[i].node=null}else i=this.lastAttachedItem-1;return t},_t.prototype._createDOMNodes=function(t){for(var i={},e=this.firstAttachedItem;e<this.lastAttachedItem;e++){while(this.items.length<=e)this._addItem();var s=this.items[e].node,o=this.items[e].data;if(s){if(!Tt(s)||!o)continue;s.style.zIndex=1,i[e]=[s,this.items[e].top-this.anchorScrollTop],this.items[e].node=null}var n=o?this.options.render(o,t.pop()):this._getTombStone();n.style.position="absolute",this.items[e].top=-1,this.scrollerEl.appendChild(n),this.items[e].node=n}return i},_t.prototype._cleanupUnusedNodes=function(t){while(t.length)this.scrollerEl.removeChild(t.pop())},_t.prototype._cacheNodeSize=function(){for(var t=this.firstAttachedItem;t<this.lastAttachedItem;t++){var i=this.items[t];if(i.data&&!i.height){var e=Tt(i.node);i.height=e?this.tombstoneHeight:i.node.offsetHeight,i.width=e?this.tombstoneWidth:i.node.offsetWidth}}},_t.prototype._fixScrollPosition=function(){this.anchorScrollTop=0;for(var t=0;t<this.anchorItem.index;t++)this.anchorScrollTop+=this.items[t].height||this.tombstoneHeight;this.anchorScrollTop+=this.anchorItem.offset;var i=this.anchorScrollTop-this.anchorItem.offset,e=this.anchorItem.index;while(e>this.firstAttachedItem)i-=this.items[e-1].height||this.tombstoneHeight,e--;return i},_t.prototype._setupAnimations=function(t,i){var e=this;for(var s in t){var o=t[s];this.items[s].node.style[X.transform]="translateY("+(this.anchorScrollTop+o[1])+"px) scale("+this.tombstoneWidth/this.items[s].width+", "+this.tombstoneHeight/this.items[s].height+")",this.items[s].node.offsetTop,o[0].offsetTop,this.items[s].node.style[X.transition]=M+"transform "+bt+"ms"}for(var n=this.firstAttachedItem;n<this.lastAttachedItem;n++){var r=t[n];if(r){var a=r[0];a.style[X.transition]=M+"transform "+bt+"ms, opacity "+bt+"ms",a.style[X.transform]="translateY("+i+"px) scale("+this.items[n].width/this.tombstoneWidth+", "+this.items[n].height/this.tombstoneHeight+")",a.style.opacity=0}i!==this.items[n].top&&(r||(this.items[n].node.style[X.transition]=""),this.items[n].node.style[X.transform]="translateY("+i+"px)"),this.items[n].top=i,i+=this.items[n].height||this.tombstoneHeight}this.scroller.maxScrollY=-(i-this.scroller.wrapperHeight+(this.hasMore?At:0));var h=setTimeout((function(){for(var i in t){var s=t[i];s[0].style.display="none",e.tombstones.push(s[0])}}),bt);this.tombstonesAnimationHandlers.push(h)},_t.prototype._getTombStone=function(){var t=this.tombstones.pop();return t?(t.style.display="",t.style.opacity=1,t.style[X.transform]="",t.style[X.transition]="",t):this.options.createTombstone()},_t.prototype._addItem=function(){this.items.push({data:null,node:null,height:0,width:0,top:0})},_t.prototype._calculateAnchoredItem=function(t,i){if(0===i)return t;var e=t.index,s=0;if(i+=t.offset,i<0){while(i<0&&e>0&&this.items[e-1].height)i+=this.items[e-1].height,e--;s=Math.max(-e,Math.ceil(Math.min(i,0)/this.tombstoneHeight))}else{while(i>0&&e<this.items.length&&this.items[e].height&&this.items[e].height<i)i-=this.items[e].height,e++;(e>=this.items.length||!this.items[e].height)&&(s=Math.floor(Math.max(i,0)/this.tombstoneHeight))}return e+=s,i-=s*this.tombstoneHeight,{index:e,offset:i}},j(xt),at(xt),c(xt),ht(xt),lt(xt),pt(xt),mt(xt),ft(xt),gt(xt),vt(xt),St(xt),xt.Version="1.15.2";var Mt=xt,It=e("2f62");function Pt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);i&&(s=s.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),e.push.apply(e,s)}return e}function kt(t){for(var i=1;i<arguments.length;i++){var e=null!=arguments[i]?arguments[i]:{};i%2?Pt(Object(e),!0).forEach((function(i){Object(n["a"])(t,i,e[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Pt(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}))}return t}var Yt=e("bb7f"),Et={name:"app",data:function(){return{isShowTopLoading:!1,isFirstGetMessage:!0,chatValue:"",emojis:Yt.emojiData,showEmoji:!1,isUserSendLongTimeSystemMessage:!1,isAdminSendLongTimeSystemMessage:!1,isInputPongIng:!1,isSendPong:!1,qiniuObservable:null,inputPongIngString:"对方正在输入...",scroll:null,handshakeKeywordList:[],searchHandshakeTimer:null}},created:function(){this.init()},computed:kt({account:function(){return this.isArtificial?this.artificialAccount:this.robotAccount},viewMessage:function(){for(var t=this.messages,i=0;i<t.length;i++)0==i&&(t[i].isShowDate=!0),i<t.length-1&&(t[i+1].isShowDate=!1,t[i+1].timestamp-120>t[i].timestamp&&(t[i+1].isShowDate=!0));return t},messages:function(){var t=this;return this.$store.getters.messages.map((function(i){return t.handlerMessage(i)}))}},Object(It["b"])(["platform","isArtificial","isShowHeader","isMobile","uid","userAccount","artificialAccount","robotInfo","robotAccount","isLoadMorEnd","userLocal","isLoadMorLoading","userInfo","isSafari","isIOS","isJudgeBigScreen"])),mounted:function(){var t=this;document.title="在线客服",setTimeout((function(){t.scroll=new Mt(t.$refs.miniImBody,{click:!0,tab:!0,scrollY:!0,scrollbar:!0,bounceTime:400,preventDefaultException:{className:/(^|\s)text(\s|$)/},mouseWheel:!0}),t.scroll.on("touchEnd",(function(i){i.y>30&&t.loadMorData()})),t.addSendButtonTouchEventListener(),t.createLinkQuery(),t.scrollIntoBottom()}),500),document.addEventListener("paste",this.inputPaste,!1)},beforeDestroy:function(){this.$store.dispatch("onToggleWindow",0)},methods:{init:function(){var t=this;this.$store.commit("updateState",{isShowPageLoading:!0}),null!=this.$mimcInstance.user&&this.$mimcInstance.user.isLogin()?(this.handelEvent(),this.$store.dispatch("onCleanRead"),this.$store.dispatch("onToggleWindow",1),this.getMessageRecord(),this.scrollIntoBottom(),setTimeout((function(){return t.$store.commit("updateState",{isShowPageLoading:!1})}),500),this.onServciceLastMessageTimeNotCallBack()):setTimeout((function(){return t.init()}),1e3)},handelEvent:function(){var t=this;this.$mimcInstance.addEventListener("receiveP2PMsg",this.receiveP2PMsg),this.$mimcInstance.addEventListener("disconnect",(function(){console.log("链接断开!"),t.isShowTopLoading=!0})),this.$mimcInstance.addEventListener("statusChange",(function(i,e,s,o){i&&(t.isShowTopLoading=!1),console.log("状态发生变化",i,e,s,o)})),this.$mimcInstance.addEventListener("serverAck",(function(i,e,s,o){console.log("发送消息服务器ack",i,e,s,o),localStorage.setItem("userLastCallBackMessageTime",Date.now()),t.isUserSendLongTimeSystemMessage=!1})),this.onCheckIsloogTimeNotCallBack(),setTimeout((function(){return t.isShowTopLoading=!1}),1e3)},enterShift:function(t){this.isMobile||"Enter"!=t.code&&(this.chatValue=this.chatValue+"\n")},addSendButtonTouchEventListener:function(){var t=this;this.isIOS?document.addEventListener("touchstart",(function(i){"mini-input-send"==i.target.getAttribute("class")&&t.sendTextMessage(),"sendKnowledgeMessage"==i.target.getAttribute("class")&&(console.log("监听发送按钮触摸事件",i.target.getAttribute("data")),t.sendKnowledgeMessage(i.target.getAttribute("data")))}),!1):this.$refs.sendButton.addEventListener("click",this.sendTextMessage,!1)},isShowInfo:function(t){return-1==["end","transfer","cancel","timeout","system"].indexOf(t)},clickPhoto:function(t){if(-1==t.indexOf("http")){var i=new Image;i.src=t;var e=window.open("","_blank");e.document.write(i.outerHTML),e.document.title="图片",e.document.close()}else window.open(t)},loadMorData:function(){var t=this;this.isLoadMorLoading||this.isLoadMorEnd||(this.$store.commit("updateState",{isLoadMorLoading:!0}),setTimeout((function(){t.getMessageRecord(),t.$store.commit("updateState",{isLoadMorLoading:!1})}),1e3))},localAdmin:function(t){var i=localStorage.getItem("admin_"+t);return i?JSON.parse(i):null},localRobot:function(t){var i=localStorage.getItem("robot_"+t);return i?JSON.parse(i):null},clickEmoji:function(t){this.showEmoji=!1,this.chatValue=this.chatValue+t,this.scrollIntoBottom()},sendPhotoMessageEvent:function(t){var i=t.target,e=i.files[0];this.sendPhotoMessage(e)},sendPhotoMessage:function(t){var i=new FileReader;i.readAsDataURL(t);var e,s=this,o=parseInt(1e4*Math.random()*(new Date).getTime())+t.name.substr(t.name.lastIndexOf("."));i.onload=function(){var i=function(){e.percent=0,s.qiniuObservable=null,s.removeMessage(s.userInfo.id,e.key),Object(r["Toast"])({message:"上传失败,请重新上传!"});var t=this.$mimcInstance.createLocalMessage("system",s.account,"您刚刚上传的图片失败了,请重新上传!");s.messages.push(s.handlerMessage(t)),s.scrollIntoBottom()},n=function(t){s.qiniuObservable=null,e.percent=100;var i=s.uploadToken.host+"/"+t;s.$mimcInstance.sendMessage("photo",s.account,i)};e=s.$mimcInstance.createLocalMessage("photo",s.account,this.result),e["percent"]=0,e.isShowCancel=!0,setTimeout((function(){e.isShowCancel=!1}),1e4),s.messages.push(s.handlerMessage(e));var a=Object.assign({},e);a.payload=s.uploadToken.host+"/"+o,s.$previewRefresh(),s.scrollIntoBottom(),s.qiniuObservable=s.$uploadFile({file:t,mode:s.uploadToken.mode,percent:function(t){e.percent=Math.ceil(t.total.percent),t.total.size<1&&(s.qiniuObservable.unsubscribe(),s.cancelMessage(e.key),Object(r["Toast"])({message:"上传失败,该图片已损坏!"}))},success:function(t){n(t)},fail:function(){i()}})}},scrollIntoBottom:function(){var t=this;setTimeout((function(){var i=t.$refs.miniImBody.querySelectorAll("li");t.scroll&&t.scroll.scrollToElement(i[i.length-1])}),50)},chatInputFocus:function(){this.scrollIntoBottom(),this.showEmoji=!1},chatInputBlur:function(){window.chatInputInterval=null,window.scroll(0,0)},receiveP2PMsg:function(t){if(console.log(t),"transfer"==t.biz_type){this.$store.commit("updateState",{isArtificial:!0,artificialAccount:t.transfer_account});var i=JSON.parse(t.payload);localStorage.setItem("admin_"+i.id,JSON.stringify(i)),localStorage.setItem("adminLastCallBackMessageTime_"+i.id,Date.now()),this.isAdminSendLongTimeSystemMessage=!1}if(!this.isArtificial||"text"!=t.biz_type&&"photo"!=t.biz_type&&"cancel"!=t.biz_type||(localStorage.setItem("adminLastCallBackMessageTime_"+this.account,Date.now()),this.isAdminSendLongTimeSystemMessage=!1),"cancel"==t.biz_type&&this.removeMessage(t.from_account,t.payload),"end"!=t.biz_type&&"timeout"!=t.biz_type||this.$store.commit("updateState",{isArtificial:!1,artificialAccount:null}),"pong"!=t.biz_type){if("search_knowledge"==t.biz_type)return this.handshakeKeywordList=[],void(""!=t.payload&&(this.handshakeKeywordList=JSON.parse(t.payload)));this.messagesPushMemory(t),this.scrollIntoBottom(),this.$previewRefresh(),window.parent.postMessage({newMessage:1},"*")}else this.inputPongIng()},inputPongIng:function(){var t=this;this.isInputPongIng||(this.isInputPongIng=!0,setTimeout((function(){t.inputPongIngString="对方正在输入."}),500),setTimeout((function(){t.inputPongIngString="对方正在输入.."}),1500),setTimeout((function(){t.inputPongIngString="对方正在输入...",t.isInputPongIng=!1}),3e3))},enterSendMessage:function(){this.isMobile||(this.sendTextMessage(),this.$refs.textarea.focus())},sendTextMessage:function(){if(0!=this.userInfo.online){var t=this.chatValue.trim();if(""!=t){var i=this.$mimcInstance.sendMessage("text",this.account,t);i.isShowCancel=!0,setTimeout((function(){return i.isShowCancel=!1}),1e4),this.messagesPushMemory(i),this.chatValue="",this.handshakeKeywordList=[]}}else Object(r["Toast"])({message:"您貌似掉线了"})},cancelMessage:function(t){var i=this.$mimcInstance.sendMessage("cancel",this.account,t);this.messagesPushMemory(i),this.removeMessage(this.userInfo.id,t),this.qiniuObservable&&this.qiniuObservable.unsubscribe()},sendKnowledgeMessage:function(t){this.handshakeKeywordList=[];var i=this.$mimcInstance.sendMessage("text",this.account,t);this.messagesPushMemory(i),this.chatValue=""},headRightBtn:function(){var t=this;if(!window.isClickHeadRightBtn){window.isClickHeadRightBtn=!0;var i=this.$mimcInstance;if(this.isArtificial)return r["MessageBox"].confirm("您确定关闭此次会话吗?","温馨提示! ").then((function(){var e=i.sendMessage("end",t.account,"");t.messagesPushMemory(e),t.$store.commit("updateState",{isArtificial:!1,artificialAccount:null})})),void setTimeout((function(){return window.isClickHeadRightBtn=!1}),3e3);var e=i.sendMessage("text",this.account,"人工");this.messagesPushMemory(e),setTimeout((function(){return window.isClickHeadRightBtn=!1}),3e3)}},messagesPushMemory:function(t){if("pong"!=t.biz_type&&"handshake"!=t.biz_type&&"into"!=t.biz_type){var i=JSON.parse(JSON.stringify(this.messages));i.push(this.handlerMessage(t)),this.$store.commit("updateState",{messages:i}),this.scrollIntoBottom()}},handlerMessage:function(t){var i="http://qiniu.cmp520.com/avatar_degault_3.png",e=this.localAdmin(t.from_account),s=this.localRobot(t.from_account);return e&&t.from_account==e.id?(t.nickname=e.nickname,t.avatar=""==e.avatar?i:e.avatar):s&&t.from_account==s.id?(t.nickname=s.nickname,t.avatar=""==s.avatar?i:s.avatar):t.from_account==this.userInfo.id&&(t.nickname=this.userInfo.nickname,-1!=this.userInfo.nickname.indexOf(this.userInfo.id)&&(t.nickname="我"),t.avatar=""==this.userInfo.avatar?i:this.userInfo.avatar),t},getMessageRecord:function(){var t=this,i=0==this.messages.length?parseInt(((new Date).getTime()+" ").substr(0,10)):this.messages[0].timestamp,e=this.messages;this.$store.dispatch("onGetMessages",{timestamp:i,oldMsg:e,callback:function(){return t.scrollIntoBottom()}})},keyUpEvent:function(){var t=this;this.isArtificial&&(this.isSendPong||(this.isSendPong=!0,setTimeout((function(){return t.isSendPong=!1}),100),this.$mimcInstance.sendMessage("pong",this.account,this.chatValue)))},removeMessage:function(t,i){for(var e=[],s=0;s<this.messages.length;s++)this.messages[s].key==i&&this.messages[s].from_account==t||e.push(this.messages[s]);this.$store.commit("updateState",{messages:e})},createLinkQuery:function(){var t=this.isArtificial?0:1,i=0==t?this.artificialAccount:this.robotAccount,e=this.isMobile?1:0,s=this.isShowHeader?1:0,o=this.platform?this.platform:1,n=this.userAccount?"&u="+this.userAccount:"",r=this.uid?"&uid="+this.uid:"",a="?h="+s+"&m="+e+"&p="+o+"&r="+t+"&a="+i+n+r;history.replaceState(null,null,location.origin+"/#"+this.$route.path+a),null!=this.userAccount&&"null"!=this.userAccount&&""!=this.userAccount&&localStorage.setItem("urlQuery",a)},clickCloseWindow:function(){window.parent.postMessage({clickCloseWindow:!0},"*")},onCheckIsloogTimeNotCallBack:function(){var t=this,i=localStorage.getItem("userLastCallBackMessageTime")||Date.now();if(this.isArtificial&&!this.isUserSendLongTimeSystemMessage&&Date.now()-i>=3e5){var e=this.$mimcInstance.createLocalMessage("system",this.account,"您已超过5分钟未回复消息,系统3分钟后将结束对话");this.messages.push(this.handlerMessage(e)),this.isUserSendLongTimeSystemMessage=!0,this.scrollIntoBottom()}setTimeout((function(){return t.onCheckIsloogTimeNotCallBack()}),1e4)},onServciceLastMessageTimeNotCallBack:function(){var t=this;if(this.robotInfo){var i=this.robotInfo.loog_time_wait_text,e=localStorage.getItem("adminLastCallBackMessageTime_"+this.account)||Date.now();if(this.isArtificial&&!this.isAdminSendLongTimeSystemMessage&&""!=i.trim()&&Date.now()-e>=12e4){var s=this.$mimcInstance.createLocalMessage("text",this.account,i);s.from_account=this.robotAccount,this.messages.push(this.handlerMessage(s)),this.isAdminSendLongTimeSystemMessage=!0,this.scrollIntoBottom()}setTimeout((function(){return t.onServciceLastMessageTimeNotCallBack()}),1e4)}},onSearchHandshake:function(){var t=this;this.chatValue&&!this.isArtificial?(this.searchHandshakeTimer&&clearTimeout(this.searchHandshakeTimer),this.searchHandshakeTimer=setTimeout((function(){t.$mimcInstance.sendMessage("search_knowledge",t.robotAccount,t.chatValue),t.searchHandshakeTimer=null}),500)):this.handshakeKeywordList=[]},inputPaste:function(t){if(!this.isMobile){var i=this,e=t.clipboardData,s=window.navigator.userAgent;if(t.clipboardData&&t.clipboardData.items&&!(e.items&&2===e.items.length&&"string"===e.items[0].kind&&"file"===e.items[1].kind&&e.types&&2===e.types.length&&"text/plain"===e.types[0]&&"Files"===e.types[1]&&s.match(/Macintosh/i)&&Number(s.match(/Chrome\/(\d{2})/i)[1])<49))for(var o=0;o<e.items.length;o++){var n=e.items[o];if("file"==n.kind){var r=n.getAsFile();if(0===r.size)return;i.sendPhotoMessage(r)}}}}},watch:{messages:function(){var t=this;setTimeout((function(){t.scroll&&t.scroll.refresh(),t.$previewRefresh()}),50)},isArtificial:function(t){this.createLinkQuery(),localStorage.setItem("isArtificial",t),localStorage.setItem("artificialTime",Date.now()),t||localStorage.removeItem("artificialTime")},artificialAccount:function(){localStorage.setItem("artificialAccount",this.artificialAccount)},userInfo:function(){this.createLinkQuery()},chatValue:function(){this.onSearchHandshake()}}},Ct=Et,Xt=(e("cde7"),e("2877")),Dt=Object(Xt["a"])(Ct,s,o,!1,null,null,null);i["default"]=Dt.exports},fdef:function(t,i){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"}}]);
//# sourceMappingURL=chunk-5e6009ff.d7088d94.js.map
\ No newline at end of file
This diff could not be displayed because it is too large.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-612d9b40"],{"5fa5":function(t,e,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"},ba17:function(t,e,A){"use strict";var r=A("5fa5"),o=A.n(r);o.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)])],1)},o=[],n=(A("8e6e"),A("ac6a"),A("456d"),A("bd86")),s=A("2f62");function a(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 i(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?a(Object(A),!0).forEach((function(e){Object(n["a"])(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):a(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var c={name:"workorder",components:{},data:function(){return{}},created:function(){document.title="我的工单"},computed:i({},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=c,d=(A("ba17"),A("2877")),g=Object(d["a"])(u,r,o,!1,null,"27b64799",null);e["default"]=g.exports}}]);
//# sourceMappingURL=chunk-612d9b40.13a3a9bb.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./src/assets/workorder.png","webpack:///./src/views/workorder.vue?7559","webpack:///./src/views/workorder.vue?2cf8","webpack:///src/views/workorder.vue","webpack:///./src/views/workorder.vue?206b","webpack:///./src/views/workorder.vue"],"names":["module","exports","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","slot","on","$event","$router","go","push","_v","_e","class","isShowHeader","workorders","length","_l","item","index","key","id","_s","title","getTypeName","tid","$formatDate","create_at","status","staticStyle","staticRenderFns","name","components","data","created","document","computed","mounted","$store","dispatch","methods","console","log","e","component"],"mappings":"4HAAAA,EAAOC,QAAU,8/C,kCCAjB,yBAAwiB,EAAG,G,yCCA3iB,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,aAAa,CAAEN,EAAgB,aAAEI,EAAG,YAAY,CAACG,MAAM,CAAC,MAAQ,GAAG,MAAQ,SAAS,CAACH,EAAG,MAAM,CAACG,MAAM,CAAC,KAAO,QAAQC,KAAK,QAAQ,CAACJ,EAAG,YAAY,CAACG,MAAM,CAAC,KAAO,QAAQE,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOV,EAAIW,QAAQC,IAAI,QAAQ,GAAGR,EAAG,YAAY,CAACG,MAAM,CAAC,KAAO,SAASE,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOV,EAAIW,QAAQE,KAAK,uBAAuBL,KAAK,SAAS,CAACJ,EAAG,OAAO,CAACJ,EAAIc,GAAG,aAAa,GAAGd,EAAIe,KAAKX,EAAG,MAAM,CAACE,YAAY,OAAOU,MAAM,CAAC,eAAgBhB,EAAIiB,eAAe,CAAEjB,EAAIkB,WAAWC,QAAU,EAAGf,EAAG,MAAM,CAACE,Y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AhBF,WAkBIvC,KAAKwC,OAAOC,SAAS,uBAErBzC,KAAKwC,OAAOC,SAAS,oBAEvBC,QAAS,CACPhB,YADJ,SACA,GACM,IACN,0EACA,SAEQ,OADAiB,QAAQC,IAAIC,GACL,OCjEuW,I,wBCQlXC,EAAY,eACd,EACAhD,EACAkC,GACA,EACA,KACA,WACA,MAIa,aAAAc,E","file":"js/chunk-612d9b40.13a3a9bb.js","sourcesContent":["module.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\"","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder.vue?vue&type=style&index=0&id=27b64799&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder.vue?vue&type=style&index=0&id=27b64799&lang=stylus&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container\"},[(_vm.isShowHeader)?_c('mt-header',{attrs:{\"fixed\":\"\",\"title\":\"我的工单\"}},[_c('div',{attrs:{\"slot\":\"left\"},slot:\"left\"},[_c('mt-button',{attrs:{\"icon\":\"back\"},on:{\"click\":function($event){return _vm.$router.go(-1)}}})],1),_c('mt-button',{attrs:{\"slot\":\"right\"},on:{\"click\":function($event){return _vm.$router.push('/workorder/create')}},slot:\"right\"},[_c('span',[_vm._v(\"创建工单\")])])],1):_vm._e(),_c('div',{staticClass:\"list\",class:{'hide-header': !_vm.isShowHeader}},[(_vm.workorders.length <= 0)?_c('div',{staticClass:\"no-data\"},[_c('img',{attrs:{\"src\":require(\"../assets/workorder.png\"),\"alt\":\"\"}}),_c('div',[_vm._v(\"您还没有发布过工单~\")])]):_c('ul',[_vm._l((_vm.workorders),function(item,index){return [_c('li',{key:index,on:{\"click\":function($event){return _vm.$router.push('/workorder/detail/'+item.id)}}},[_c('div',{staticClass:\"title\"},[_vm._v(_vm._s(item.title))]),_c('div',[_c('span',{staticClass:\"type\"},[_vm._v(_vm._s(_vm.getTypeName(item.tid)))]),_c('span',{staticClass:\"date\"},[_vm._v(_vm._s(_vm.$formatDate(item.create_at)))])]),(item.status == 1)?_c('i',{staticStyle:{\"color\":\"#8bc34a\"}},[_vm._v(\"已回复\")]):_vm._e(),(item.status == 3)?_c('i',{staticStyle:{\"color\":\"#ccc\"}},[_vm._v(\"已结束\")]):_vm._e(),(item.status == 0)?_c('i',{staticStyle:{\"color\":\"#FF9800\"}},[_vm._v(\"待处理\")]):_vm._e(),(item.status == 2)?_c('i',{staticStyle:{\"color\":\"#FF9800\"}},[_vm._v(\"待回复\")]):_vm._e()])]})],2)])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"container\">\n \n <mt-header v-if=\"isShowHeader\" fixed title=\"我的工单\">\n <div slot=\"left\">\n <mt-button @click=\"$router.go(-1)\" icon=\"back\"></mt-button>\n </div>\n <mt-button @click=\"$router.push('/workorder/create')\" slot=\"right\">\n <span>创建工单</span>\n </mt-button>\n </mt-header>\n <div class=\"list\" :class=\"{'hide-header': !isShowHeader}\">\n <div class=\"no-data\" v-if=\"workorders.length <= 0\">\n <img src=\"../assets/workorder.png\" alt=\"\">\n <div>您还没有发布过工单~</div>\n </div>\n <ul v-else>\n <template v-for=\"(item,index) in workorders\">\n <li :key=\"index\" @click=\"$router.push('/workorder/detail/'+item.id)\">\n <div class=\"title\">{{item.title}}</div>\n <div>\n <span class=\"type\">{{getTypeName(item.tid)}}</span>\n <span class=\"date\">{{$formatDate(item.create_at)}}</span>\n </div>\n <i v-if=\"item.status == 1\" style=\"color:#8bc34a;\">已回复</i>\n <i v-if=\"item.status == 3\" style=\"color:#ccc\">已结束</i>\n <i v-if=\"item.status == 0\" style=\"color:#FF9800\">待处理</i>\n <i v-if=\"item.status == 2\" style=\"color:#FF9800\">待回复</i>\n </li>\n </template>\n </ul> \n </div>\n\n </div>\n</template>\n<script>\nimport { mapGetters } from 'vuex'\nexport default {\n name: \"workorder\",\n components: {},\n data() {\n return {};\n },\n created() {\n document.title = \"我的工单\"\n },\n computed: {\n ...mapGetters([\n 'isShowHeader',\n 'workorders',\n 'workorderTypes',\n ])\n },\n mounted() {\n // 获取工单类型\n this.$store.dispatch(\"onGetWorkorderTypes\");\n // 获取工单列表\n this.$store.dispatch(\"onGetWorkorders\");\n },\n methods: {\n getTypeName(tid){\n try{\n return this.workorderTypes.filter((i)=>i.id == tid)[0].title\n }catch(e){\n console.log(e)\n return \"\"\n }\n }\n }\n};\n</script>\n<style lang=\"stylus\" scoped>\n.no-data{\n text-align center\n padding-top 50px\n img{\n width 50px\n height 50px\n }\n div{\n color #666\n font-size 14px\n }\n}\n.list{\n padding-top 50px\n &.hide-header{\n padding-top 0\n }\n li{\n padding 10px 20px\n background url('../assets/workorder.png') 10px center no-repeat \n background-size 25px\n padding-left 40px\n padding-right 70px\n border-bottom 1px solid #ddd\n position relative\n height 40px\n .title{\n font-size 15px\n color #333\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n .type{\n font-size 13px\n color #666\n }\n .date{\n margin-left 10px\n font-size 13px\n color #999\n }\n i{\n font-style normal\n font-size 13px\n position absolute\n right 10px\n top 0\n height: 20px;\n bottom 0\n margin auto 0\n }\n }\n}\n\n</style>\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./workorder.vue?vue&type=template&id=27b64799&scoped=true&\"\nimport script from \"./workorder.vue?vue&type=script&lang=js&\"\nexport * from \"./workorder.vue?vue&type=script&lang=js&\"\nimport style0 from \"./workorder.vue?vue&type=style&index=0&id=27b64799&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"27b64799\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6c9c88aa"],{"0673":function(e,t,s){},a481:function(e,t,s){"use strict";var r=s("cb7c"),i=s("4bf8"),a=s("9def"),n=s("4588"),o=s("0390"),c=s("5f1b"),l=Math.max,u=Math.min,p=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,v=/\$([$&`']|\d\d?)/g,f=function(e){return void 0===e?e:String(e)};s("214f")("replace",2,(function(e,t,s,h){return[function(r,i){var a=e(this),n=void 0==r?void 0:r[t];return void 0!==n?n.call(r,a,i):s.call(String(a),r,i)},function(e,t){var i=h(s,e,this,t);if(i.done)return i.value;var p=r(e),d=String(this),v="function"===typeof t;v||(t=String(t));var m=p.global;if(m){var b=p.unicode;p.lastIndex=0}var w=[];while(1){var k=c(p,d);if(null===k)break;if(w.push(k),!m)break;var y=String(k[0]);""===y&&(p.lastIndex=o(d,a(p.lastIndex),b))}for(var O="",T=0,j=0;j<w.length;j++){k=w[j];for(var q=String(k[0]),x=l(u(n(k.index),d.length),0),S=[],_=1;_<k.length;_++)S.push(f(k[_]));var P=k.groups;if(v){var C=[q].concat(S,x,d);void 0!==P&&C.push(P);var $=String(t.apply(void 0,C))}else $=g(q,d,x,S,P,t);x>=T&&(O+=d.slice(T,x)+$,T=x+q.length)}return O+d.slice(T)}];function g(e,t,r,a,n,o){var c=r+e.length,l=a.length,u=v;return void 0!==n&&(n=i(n),u=d),s.call(o,u,(function(s,i){var o;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(c);case"<":o=n[i.slice(1,-1)];break;default:var u=+i;if(0===u)return s;if(u>l){var d=p(u/10);return 0===d?s:d<=l?void 0===a[d-1]?i.charAt(1):a[d-1]+i.charAt(1):s}o=a[u-1]}return void 0===o?"":o}))}}))},ede1:function(e,t,s){"use strict";s.r(t);var r=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("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)},i=[],a=(s("8e6e"),s("ac6a"),s("456d"),s("a481"),s("bd86")),n=s("2f62"),o=s("76a0"),c=s("bc3a"),l=s.n(c);function u(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}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(n["b"])(["isShowHeader","workorders","userInfo","workorderTypes","uploadToken","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 r=this;this.$uploadFile({file:s,mode:this.uploadToken.mode,percent:function(){},success:function(e){var t;r.isShowUploadLoading=!1;var s=r.uploadToken.host+"/"+e,i=e.substr(e.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(i)?t="<br><img style='max-width:60%' preview='1' src='"+s+"' />":(t="<br><img style='width:20px;height:30px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",t+="<a target='_blank' href='"+s+"'>下载附件</a>"),r.source=t,Object(o["Toast"])({message:"上传成功~"})},fail:function(e){r.isShowUploadLoading=!1,e.response&&e.response.data&&Object(o["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(o["Toast"])({message:"工单创建成功~"}),setTimeout((function(){return e.$router.replace("/workorder/detail/"+t.data.data)}),500)})).catch((function(t){e.isSubmit=!1,Object(o["Toast"])({message:t.response.data.message}),console.log(t)}))):Object(o["Toast"])({message:"工单内容不能为空!"}):Object(o["Toast"])({message:"工单标题不能为空!"}):Object(o["Toast"])({message:"请选择工单类型!"})}}},v=d,f=(s("fb2c"),s("2877")),h=Object(f["a"])(v,r,i,!1,null,"43d71195",null);t["default"]=h.exports},fb2c:function(e,t,s){"use strict";var r=s("0673"),i=s.n(r);i.a}}]);
//# sourceMappingURL=chunk-6c9c88aa.d765f1fb.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./node_modules/core-js/modules/es6.regexp.replace.js","webpack:///./src/views/workorder_create.vue?329a","webpack:///src/views/workorder_create.vue","webpack:///./src/views/workorder_create.vue?1481","webpack:///./src/views/workorder_create.vue","webpack:///./src/views/workorder_create.vue?a8eb"],"names":["anObject","toObject","toLength","toInteger","advanceStringIndex","regExpExec","max","Math","min","floor","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","maybeToString","it","undefined","String","defined","REPLACE","$replace","maybeCallNative","searchValue","replaceValue","O","this","fn","call","regexp","res","done","value","rx","S","functionalReplace","global","fullUnicode","unicode","lastIndex","results","result","push","matchStr","accumulatedResult","nextSourcePosition","i","length","matched","position","index","captures","j","namedCaptures","groups","replacerArgs","concat","replacement","apply","getSubstitution","slice","str","tailPos","m","symbols","match","ch","capture","charAt","n","f","render","_vm","_h","$createElement","_c","_self","staticClass","attrs","slot","on","$event","$router","go","_e","class","isShowHeader","isShowTypesPicker","_v","_s","selectTyped","directives","name","rawName","request","expression","domProps","target","composing","$set","source","uploadFile","submit","types","onValuesChange","staticRenderFns","components","data","isSubmit","computed","values","workorderTypes","title","mounted","methods","tid","id","console","log","_","fileDom","e","file","files","isShowUploadLoading","$uploadFile","mode","uploadToken","percent","success","html","self","fullPath","host","src","fileType","substr","lastIndexOf","indexOf","message","fail","response","content","component"],"mappings":"yIAEA,IAAIA,EAAW,EAAQ,QACnBC,EAAW,EAAQ,QACnBC,EAAW,EAAQ,QACnBC,EAAY,EAAQ,QACpBC,EAAqB,EAAQ,QAC7BC,EAAa,EAAQ,QACrBC,EAAMC,KAAKD,IACXE,EAAMD,KAAKC,IACXC,EAAQF,KAAKE,MACbC,EAAuB,4BACvBC,EAAgC,oBAEhCC,EAAgB,SAAUC,GAC5B,YAAcC,IAAPD,EAAmBA,EAAKE,OAAOF,IAIxC,EAAQ,OAAR,CAAyB,UAAW,GAAG,SAAUG,EAASC,EAASC,EAAUC,GAC3E,MAAO,CAGL,SAAiBC,EAAaC,GAC5B,IAAIC,EAAIN,EAAQO,MACZC,OAAoBV,GAAfM,OAA2BN,EAAYM,EAAYH,GAC5D,YAAcH,IAAPU,EACHA,EAAGC,KAAKL,EAAaE,EAAGD,GACxBH,EAASO,KAAKV,OAAOO,GAAIF,EAAaC,IAI5C,SAAUK,EAAQL,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IAAIC,EADJC,EAAKP,qBAAsB,EAE3B,IAAIQ,EAAWD,EAAKJ,YAAYM,KAAO,IAAMC,EACzCC,EAAWD,EAAIE,OAAOF,EAAIG,YAAY,KAAO,IACK,GAAlD,4BAA4BC,QAAQH,GACtC,EAAZ,6DAEY,EAAZ,qIACY,GAAZ,4CAEUJ,EAAK/B,OAAS8B,EACd,OAAV,WAAU,CAAV,CACYS,QAAS,WAGbC,KAtBR,SAsBA,GACUT,EAAKP,qBAAsB,EACvBH,EAAEoB,UAAYpB,EAAEoB,SAASlC,MAC3B,OAAZ,WAAY,CAAZ,CACcgC,QAASlB,EAAEoB,SAASlC,KAAKgC,cAOnCrC,OAjDJ,WAiDA,WACA,oBAMA,8BAMA,gCAMA,gBACM5E,KAAKkF,UAAW,EAChBlF,KAAKoE,QAAQgD,SAAWpH,KAAK0E,OAC7B,EAAN,EACA,8CACA,kBACQ,EAAR,YACQ,OAAR,WAAQ,CAAR,CACU,QAAV,YAEQ,YAAR,WAAU,OAAV,8DAEA,mBACQ,EAAR,YACQ,OAAR,WAAQ,CAAR,CACU,QAAV,0BAEQ,QAAR,WAtBQ,OAAR,WAAQ,CAAR,CACUuC,QAAS,cAPX,OAAR,WAAQ,CAAR,CACUA,QAAS,cAPX,OAAR,WAAQ,CAAR,CACUA,QAAS,gBC5J0W,I,wBCQzXI,EAAY,eACd,EACAxE,EACAkC,GACA,EACA,KACA,WACA,MAIa,aAAAsC,E,2CCnBf,yBAA+iB,EAAG","file":"js/chunk-6c9c88aa.d765f1fb.js","sourcesContent":["'use strict';\n\nvar anObject = require('./_an-object');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar toInteger = require('./_to-integer');\nvar advanceStringIndex = require('./_advance-string-index');\nvar regExpExec = require('./_regexp-exec-abstract');\nvar max = Math.max;\nvar min = Math.min;\nvar floor = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&`']|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&`']|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {\n return [\n // `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative($replace, regexp, this, replaceValue);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n results.push(result);\n if (!global) break;\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n\n // https://tc39.github.io/ecma262/#sec-getsubstitution\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return $replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n }\n});\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container\"},[(_vm.isShowHeader)?_c('mt-header',{attrs:{\"fixed\":\"\",\"title\":\"创建工单\"}},[_c('div',{attrs:{\"slot\":\"left\"},slot:\"left\"},[_c('mt-button',{attrs:{\"icon\":\"back\"},on:{\"click\":function($event){return _vm.$router.go(-1)}}})],1)]):_vm._e(),_c('div',{staticClass:\"content\",class:{'hide-header': !_vm.isShowHeader}},[_c('div',{staticClass:\"field-line arrow-right\",on:{\"click\":function($event){_vm.isShowTypesPicker = true}}},[_c('span',[_vm._v(\"类型:\")]),_c('span',[_vm._v(_vm._s(_vm.selectTyped || '选择工单分类'))])]),_c('div',{staticClass:\"field-line algin-left\"},[_c('span',[_vm._v(\"标题:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.title),expression:\"request.title\"}],attrs:{\"type\":\"text\",\"placeholder\":\"请输入工单标题~\"},domProps:{\"value\":(_vm.request.title)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"title\", $event.target.value)}}})]),_c('div',{staticClass:\"field-line algin-left\"},[_c('span',[_vm._v(\"手机:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.phone),expression:\"request.phone\"}],attrs:{\"type\":\"number\",\"placeholder\":\"请输入您的手机~\"},domProps:{\"value\":(_vm.request.phone)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"phone\", $event.target.value)}}})]),_c('div',{staticClass:\"tip\"},[_vm._v(\"必填,预留手机号方便客服联系到您~\")]),_c('div',{staticClass:\"field-line algin-left\"},[_c('span',[_vm._v(\"邮箱:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.email),expression:\"request.email\"}],attrs:{\"type\":\"email\",\"placeholder\":\"请输入您的电子邮箱~\"},domProps:{\"value\":(_vm.request.email)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"email\", $event.target.value)}}})]),_c('div',{staticClass:\"tip\"},[_vm._v(\"非必填,预留邮箱后若工单回复后会通过邮箱通知您~\")]),_c('div',{staticClass:\"field-line textarea\"},[_c('span',[_vm._v(\"内容:\")]),_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.content),expression:\"request.content\"}],attrs:{\"placeholder\":\"请输入您的工单内容~\"},domProps:{\"value\":(_vm.request.content)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"content\", $event.target.value)}}})]),_c('div',{staticClass:\"field-line arrow-right file\"},[_c('span',[_vm._v(\"附件:\")]),_c('span',{class:{'ed': _vm.source != ''}},[_vm._v(_vm._s(_vm.source ? '已上传附件,重新上传可替换~' : '上传附件'))]),_c('input',{attrs:{\"type\":\"file\"},on:{\"change\":_vm.uploadFile}})]),_c('span',{staticClass:\"sub-btn\",on:{\"click\":function($event){return _vm.submit()}}},[_vm._v(\"提交\")])]),(_vm.isShowTypesPicker)?_c('div',{staticClass:\"types-sheet\"},[_c('div',{staticClass:\"picker-box\"},[_c('div',{staticClass:\"title\"},[_c('span',[_vm._v(\"选择工单类型\")]),_c('span',{staticClass:\"sub-btn\",on:{\"click\":function($event){_vm.isShowTypesPicker = false}}},[_vm._v(\"确定\")])]),_c('mt-picker',{attrs:{\"slots\":_vm.types},on:{\"change\":_vm.onValuesChange}})],1)]):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"container\">\n <mt-header v-if=\"isShowHeader\" fixed title=\"创建工单\">\n <div slot=\"left\">\n <mt-button @click=\"$router.go(-1)\" icon=\"back\"></mt-button>\n </div>\n </mt-header>\n <div class=\"content\" :class=\"{'hide-header': !isShowHeader}\">\n\n <div class=\"field-line arrow-right\" @click=\"isShowTypesPicker = true\">\n <span>类型:</span>\n <span>{{selectTyped || '选择工单分类'}}</span>\n </div>\n <div class=\"field-line algin-left\">\n <span>标题:</span>\n <input type=\"text\" v-model=\"request.title\" placeholder=\"请输入工单标题~\">\n </div>\n <div class=\"field-line algin-left\">\n <span>手机:</span>\n <input type=\"number\" v-model=\"request.phone\" placeholder=\"请输入您的手机~\">\n </div>\n <div class=\"tip\">必填,预留手机号方便客服联系到您~</div>\n <div class=\"field-line algin-left\">\n <span>邮箱:</span>\n <input type=\"email\" v-model=\"request.email\" placeholder=\"请输入您的电子邮箱~\">\n </div>\n <div class=\"tip\">非必填,预留邮箱后若工单回复后会通过邮箱通知您~</div>\n <div class=\"field-line textarea\">\n <span>内容:</span>\n <textarea v-model=\"request.content\" placeholder=\"请输入您的工单内容~\"></textarea>\n </div>\n <div class=\"field-line arrow-right file\">\n <span>附件:</span>\n <span :class=\"{'ed': source != ''}\">{{source ? '已上传附件,重新上传可替换~' : '上传附件'}}</span>\n <input type=\"file\" @change=\"uploadFile\" />\n </div>\n <span class=\"sub-btn\" @click=\"submit()\">提交</span>\n </div>\n\n <!-- types-sheet -->\n <div class=\"types-sheet\" v-if=\"isShowTypesPicker\">\n <!-- <div class=\"mask\" @click=\"isShowTypesPicker = false\"></div> -->\n <div class=\"picker-box\">\n <div class=\"title\">\n <span>选择工单类型</span>\n <span class=\"sub-btn\" @click=\"isShowTypesPicker = false\">确定</span>\n </div>\n <mt-picker :slots=\"types\" @change=\"onValuesChange\"></mt-picker>\n </div>\n </div>\n\n </div>\n</template>\n<script>\nimport { mapGetters } from \"vuex\";\nimport { Toast } from \"mint-ui\";\nimport axios from \"axios\";\nexport default {\n name: \"workorder_create\",\n components: {},\n data() {\n return {\n isSubmit: false,\n request: {\n \"tid\": 0,\n \"title\": \"\",\n \"content\": \"\",\n \"phone\": \"\",\n \"email\": \"\"\n },\n selectTyped: \"\",\n source: \"\",\n isShowTypesPicker: false\n };\n },\n computed: {\n ...mapGetters([\n \"isShowHeader\",\n \"workorders\",\n \"userInfo\",\n \"workorderTypes\",\n \"uploadToken\",\n \"workorderTypes\"\n ]),\n types() {\n var values = [];\n var slot = [\n {\n flex: 1,\n values: [],\n className: \"workorder-create-picker\",\n textAlign: \"center\"\n }\n ];\n for (var i = 0; i < this.workorderTypes.length; i++) {\n values.push(this.workorderTypes[i].title);\n }\n slot[0].values = values;\n return slot;\n }\n },\n mounted() {\n \n },\n methods: {\n onValuesChange(_, values) {\n this.selectTyped = values[0]\n for(var i=0; i<this.workorderTypes.length; i++){\n if(values[0] == this.workorderTypes[i].title){\n this.request.tid = this.workorderTypes[i].id\n break\n }\n }\n console.log(_)\n },\n uploadFile(e) {\n var fileDom = e.target;\n var file = fileDom.files[0];\n this.isShowUploadLoading = true;\n const self = this;\n this.$uploadFile({\n file,\n mode: this.uploadToken.mode,\n // 七牛才会执行\n percent() {},\n success(src) {\n\n self.isShowUploadLoading = false;\n var html\n var fullPath = self.uploadToken.host + \"/\" + src;\n var fileType = src.substr(src.lastIndexOf(\".\") + 1);\n if (\"jpg,jpeg,png,JPG,JPEG,PNG\".indexOf(fileType) != -1) {\n html = \"<br><img style='max-width:60%' preview='1' src='\" + fullPath + \"' />\"\n }else{\n html = \"<br><img style='width:20px;height:30px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />\"\n html += \"<a target='_blank' href='\"+fullPath+\"'>下载附件</a>\"\n }\n self.source = html\n Toast({\n message: \"上传成功~\"\n });\n },\n fail(e) {\n self.isShowUploadLoading = false;\n if (e.response && e.response.data) {\n Toast({\n message: e.response.data.message\n });\n return;\n }\n }\n });\n },\n submit(){\n if(this.request.tid == 0){\n Toast({\n message: \"请选择工单类型!\"\n });\n return\n }\n if(this.request.title.trim() == \"\"){\n Toast({\n message: \"工单标题不能为空!\"\n });\n return\n }\n if(this.request.content.trim() == \"\"){\n Toast({\n message: \"工单内容不能为空!\"\n });\n return\n }\n if(this.isSubmit) return\n this.isSubmit = true\n this.request.content += this.source\n axios\n .post(\"/public/workorder/create\", this.request)\n .then(response => {\n this.isSubmit = false\n Toast({\n message: \"工单创建成功~\"\n });\n setTimeout(()=>this.$router.replace(\"/workorder/detail/\"+response.data.data), 500)\n })\n .catch(error => {\n this.isSubmit = false\n Toast({\n message: error.response.data.message\n });\n console.log(error);\n });\n }\n }\n};\n</script>\n<style lang=\"stylus\" scoped>\n.content {\n padding 50px 10px\n .field-line{\n display flex\n justify-content space-between\n box-sizing border-box\n height 45px\n border-bottom 1px solid #ddd\n align-content center\n align-items center\n font-size 14px\n color #333\n span:first-child{\n width 35px\n }\n input{\n flex-grow 1\n padding-left 10px\n height 100%\n background none \n border 0\n color #333\n font-size 14px\n border-radius 0\n }\n &.algin-left{\n align-content left \n align-items left\n }\n &.arrow-right{\n background url(./../assets/arrow.png) right center no-repeat\n background-size 18px\n padding-right 25px\n }\n &.file{\n position relative\n overflow hidden\n margin-top 20px\n border-top 1px solid #ddd\n .ed{\n color #8bc34a\n }\n input{\n font-size 100px\n opacity 0\n position absolute\n top 0\n right 0\n }\n }\n &.textarea{\n align-items start\n align-content start\n border-bottom 0\n padding-top 10px\n height 100px\n textarea{\n flex-grow 1\n border 0\n height 100%\n resize none\n color #333\n font-size 14px\n padding 3px 10px\n background-color rgba(0, 0, 0, 0.03);\n border-radius 3px\n }\n }\n }\n .tip{\n font-size 11px\n color #ff9800\n }\n &.hide-header {\n padding-top: 0;\n }\n .sub-btn {\n display: block;\n width: 100%;\n height: 45px;\n color: #fff;\n margin-top 30px\n line-height: 45px;\n text-align: center;\n border-radius: 3px;\n border: none;\n font-size: 14px;\n background: linear-gradient(to right, #26a2ff, #736cde);\n flex-shrink: 0;\n\n &:active {\n opacity: 0.8;\n }\n }\n}\n.types-sheet{\n width 100vw;\n height 100vh\n position fixed\n top 0\n left 0\n right 0\n bottom 0\n margin auto\n background-color rgba(0,0,0,.5)\n // .mask{\n // width 100vw;\n // height 100vh\n // background-color rgba(0,0,0,.5)\n // }\n .picker-box{\n height 250px\n width 100vw\n position absolute\n bottom 0\n left 0\n right 0\n margin 0 auto\n background-color #fff\n }\n .title{\n height 35px\n border-bottom 1px solid #f3f3f3\n display flex\n justify-content space-between\n padding 0 10px\n box-sizing border-box\n align-content center\n align-items center\n span{\n font-size 14px\n color #333\n }\n .sub-btn {\n display: block;\n width: 55px;\n height: 30px;\n color: #26a2ff\n line-height: 30px;\n text-align: right;\n font-size: 14px;\n font-weight 900\n &:active {\n opacity: 0.8;\n }\n }\n }\n}\n</style>\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./workorder_create.vue?vue&type=template&id=43d71195&scoped=true&\"\nimport script from \"./workorder_create.vue?vue&type=script&lang=js&\"\nexport * from \"./workorder_create.vue?vue&type=script&lang=js&\"\nimport style0 from \"./workorder_create.vue?vue&type=style&index=0&id=43d71195&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"43d71195\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=style&index=0&id=43d71195&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=style&index=0&id=43d71195&lang=stylus&scoped=true&\""],"sourceRoot":""}
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c5fee4c4"],{"0d1c":function(t,e,o){},"269c":function(t,e,o){t.exports=o.p+"img/fujian1.083cd8b7.png"},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("关闭工单")])]):s("mt-button",{attrs:{slot:"right"},on:{click:function(e){return t.del()}},slot:"right"},[s("span",[t._v("删除")])])],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",[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.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.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:{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=[],a=(o("8e6e"),o("ac6a"),o("456d"),o("bd86")),n=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(a["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 A={name:"workorder_detail",components:{},data:function(){return{isShowUploadLoading:!1,isSubmit:!1,workorder:{},comments:[],fileType:"",request:{source:"",content:""}}},computed:d({},Object(n["b"])(["isShowHeader","workorders","userInfo","workorderTypes","uploadToken"])),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:""},document.querySelector(".container").scrollTop=1e4})).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,mode:this.uploadToken.mode,percent:function(){},success:function(t){var e;s.isShowUploadLoading=!1;var o=s.uploadToken.host+"/"+t,r=t.substr(t.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(r)?e="<br><img style='max-width:60%' preview='1' src='"+o+"' />":(e="<br><img style='width:20px;height:30px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",e+="<a target='_blank' 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)}))}))}}},p=A,g=(o("550d"),o("2877")),m=Object(g["a"])(p,s,r,!1,null,"1d2064aa",null);e["default"]=m.exports},"550d":function(t,e,o){"use strict";var s=o("0d1c"),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-c5fee4c4.1073caa4.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./src/assets/fujian1.png","webpack:///./src/views/workorder_detail.vue?9d77","webpack:///src/views/workorder_detail.vue","webpack:///./src/views/workorder_detail.vue?9869","webpack:///./src/views/workorder_detail.vue","webpack:///./src/views/workorder_detail.vue?3037","webpack:///./src/assets/loading.gif"],"names":["module","exports","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","slot","on","$event","$router","go","workorder","status","close","_v","del","_e","class","isShowHeader","_s","title","domProps","content","phone","email","$formatDate","create_at","staticStyle","comments","length","_l","item","index","key","aid","userInfo","avatar","nickname","request","source","isShowUploadLoading","directives","name","rawName","value","expression","inputBlur","target","composing","$set","uploadFile","reply","staticRenderFns","components","data","isSubmit","fileType","computed","created","document","$store","commit","methods","getWorkOrder","getComments","trim","message","setTimeout","body","scrollTo","window","fileDom","e","file","files","$uploadFile","mode","uploadToken","percent","success","html","self","fullPath","host","src","substr","lastIndexOf","indexOf","fail","response","wid","id","component"],"mappings":"8HAAAA,EAAOC,QAAU,IAA0B,4B,yCCA3C,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,aAAa,CAAEN,EAAgB,aAAEI,EAAG,YAAY,CAACG,MAAM,CAAC,MAAQ,GAAG,MAAQ,SAAS,CAACH,EAAG,MAAM,CAACG,MAAM,CA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YAEU,QAAV,gBCrQ6X,I,wBCQzXC,EAAY,eACd,EACA/F,EACAuD,GACA,EACA,KACA,WACA,MAIa,aAAAwC,E,6CCnBf,yBAA+iB,EAAG,G,mBCAljBjG,EAAOC,QAAU","file":"js/chunk-c5fee4c4.1073caa4.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/fujian1.083cd8b7.png\";","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container\"},[(_vm.isShowHeader)?_c('mt-header',{attrs:{\"fixed\":\"\",\"title\":\"工单详细\"}},[_c('div',{attrs:{\"slot\":\"left\"},slot:\"left\"},[_c('mt-button',{attrs:{\"icon\":\"back\"},on:{\"click\":function($event){return _vm.$router.go(-1)}}})],1),(_vm.workorder.status != 3)?_c('mt-button',{attrs:{\"slot\":\"right\"},on:{\"click\":function($event){return _vm.close()}},slot:\"right\"},[_c('span',[_vm._v(\"关闭工单\")])]):_c('mt-button',{attrs:{\"slot\":\"right\"},on:{\"click\":function($event){return _vm.del()}},slot:\"right\"},[_c('span',[_vm._v(\"删除\")])])],1):_vm._e(),_c('div',{staticClass:\"content\",class:{'hide-header': !_vm.isShowHeader}},[_c('div',{staticClass:\"head\"},[_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"标题:\")]),_c('span',[_vm._v(_vm._s(_vm.workorder.title))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"内容:\")]),_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.workorder.content)}})]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"电话:\")]),_c('span',[_vm._v(_vm._s(_vm.workorder.phone || '未预留电话号码'))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"邮箱:\")]),_c('span',[_vm._v(_vm._s(_vm.workorder.email || '未预留邮箱'))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"时间:\")]),_c('span',[_vm._v(_vm._s(_vm.$formatDate(_vm.workorder.create_at)))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"状态:\")]),_c('span',[(_vm.workorder.status == 1)?_c('i',{staticStyle:{\"color\":\"#8bc34a\"}},[_vm._v(\"已回复\")]):_vm._e(),(_vm.workorder.status == 3)?_c('i',{staticStyle:{\"color\":\"#ccc\"}},[_vm._v(\"已结束\")]):_vm._e(),(_vm.workorder.status == 0)?_c('i',{staticStyle:{\"color\":\"#FF9800\"}},[_vm._v(\"待处理\")]):_vm._e(),(_vm.workorder.status == 2)?_c('i',{staticStyle:{\"color\":\"#FF9800\"}},[_vm._v(\"待回复\")]):_vm._e()])])]),_c('div',{staticClass:\"comments\"},[(_vm.comments.length <= 0)?_c('div',{staticClass:\"no-data\"},[_vm._v(\"暂无回复内容,请您耐心等待~\")]):_vm._l((_vm.comments),function(item,index){return [_c('div',{key:index,staticClass:\"item\"},[_c('div',{staticClass:\"avatar\"},[(item.aid == '0')?_c('img',{attrs:{\"src\":_vm.userInfo.avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png',\"alt\":\"\"}}):_c('img',{attrs:{\"src\":item.avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png',\"alt\":\"\"}})]),_c('div',{staticClass:\"right\"},[(item.aid == '0')?_c('div',{staticClass:\"nickname\"},[_vm._v(\"我\")]):_c('div',{staticClass:\"nickname\"},[_vm._v(_vm._s(item.nickname))]),_c('div',{staticClass:\"detail\",domProps:{\"innerHTML\":_vm._s(item.content)}}),_c('div',{staticClass:\"date\"},[_vm._v(_vm._s(_vm.$formatDate(item.create_at)))])])])]}),(_vm.workorder.status == 3)?_c('div',{staticClass:\"workorder-close\"},[_vm._v(\"工单已结束~\")]):_vm._e()],2),(_vm.request.source != '' || _vm.isShowUploadLoading)?_c('div',{staticClass:\"file-view\"},[(_vm.isShowUploadLoading)?_c('span',[_c('img',{attrs:{\"src\":require(\"./../assets/loading.gif\"),\"alt\":\"\"}}),_c('i',[_vm._v(\"上传中~\")])]):_c('span',[_c('img',{attrs:{\"src\":require(\"./../assets/fujian1.png\"),\"alt\":\"\"}}),_c('i',[_vm._v(\"你已成功添加附件,重新上传可替换~\")])])]):_vm._e(),(_vm.workorder.status != 3)?_c('div',{staticClass:\"input-form\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.content),expression:\"request.content\"}],attrs:{\"placeholder\":\"请输入内容~\"},domProps:{\"value\":(_vm.request.content)},on:{\"blur\":function($event){return _vm.inputBlur()},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"content\", $event.target.value)}}}),_c('span',{staticClass:\"icon-btn\"},[_c('input',{attrs:{\"type\":\"file\",\"onclick\":\"this.value = null\"},on:{\"change\":_vm.uploadFile}})]),_c('span',{staticClass:\"sub-btn\",on:{\"click\":function($event){return _vm.reply()}}},[_vm._v(\"提交\")])]):_vm._e()])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"container\">\n <mt-header v-if=\"isShowHeader\" fixed title=\"工单详细\">\n <div slot=\"left\">\n <mt-button @click=\"$router.go(-1)\" icon=\"back\"></mt-button>\n </div>\n <mt-button @click=\"close()\" v-if=\"workorder.status != 3\" slot=\"right\">\n <span>关闭工单</span>\n </mt-button>\n <mt-button @click=\"del()\" v-else slot=\"right\">\n <span>删除</span>\n </mt-button>\n </mt-header>\n <div class=\"content\" :class=\"{'hide-header': !isShowHeader}\">\n <div class=\"head\">\n <div class=\"con\">\n <span>标题:</span>\n <span>{{workorder.title}}</span>\n </div>\n <div class=\"con\">\n <span>内容:</span>\n <span v-html=\"workorder.content\"></span>\n </div>\n <div class=\"con\">\n <span>电话:</span>\n <span>{{workorder.phone || '未预留电话号码'}}</span>\n </div>\n <div class=\"con\">\n <span>邮箱:</span>\n <span>{{workorder.email || '未预留邮箱'}}</span>\n </div>\n <div class=\"con\">\n <span>时间:</span>\n <span>{{$formatDate(workorder.create_at)}}</span>\n </div>\n <div class=\"con\">\n <span>状态:</span>\n <span>\n <i v-if=\"workorder.status == 1\" style=\"color:#8bc34a;\">已回复</i>\n <i v-if=\"workorder.status == 3\" style=\"color:#ccc\">已结束</i>\n <i v-if=\"workorder.status == 0\" style=\"color:#FF9800\">待处理</i>\n <i v-if=\"workorder.status == 2\" style=\"color:#FF9800\">待回复</i>\n </span>\n </div>\n </div>\n <div class=\"comments\">\n <div class=\"no-data\" v-if=\"comments.length <= 0\">暂无回复内容,请您耐心等待~</div>\n <template v-else v-for=\"(item,index) in comments\">\n <div :key=\"index\" class=\"item\">\n <div class=\"avatar\">\n <img\n v-if=\"item.aid == '0'\"\n :src=\"userInfo.avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png'\"\n alt\n />\n <img v-else :src=\"item.avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png'\" alt />\n </div>\n <div class=\"right\">\n <div class=\"nickname\" v-if=\"item.aid == '0'\">我</div>\n <div class=\"nickname\" v-else>{{item.nickname}}</div>\n <div class=\"detail\" v-html=\"item.content\"></div>\n <div class=\"date\">{{$formatDate(item.create_at)}}</div>\n </div>\n </div>\n </template>\n <div class=\"workorder-close\" v-if=\"workorder.status == 3\">工单已结束~</div>\n </div>\n <div class=\"file-view\" v-if=\"request.source != '' || isShowUploadLoading\">\n <span v-if=\"isShowUploadLoading\">\n <img src=\"./../assets/loading.gif\" alt />\n <i>上传中~</i>\n </span>\n <span v-else>\n <img src=\"./../assets/fujian1.png\" alt />\n <i>你已成功添加附件,重新上传可替换~</i>\n </span>\n </div>\n <div class=\"input-form\" v-if=\"workorder.status != 3\">\n <textarea v-model=\"request.content\" @blur=\"inputBlur()\" placeholder=\"请输入内容~\"></textarea>\n <span class=\"icon-btn\">\n <input type=\"file\" @change=\"uploadFile\" onclick=\"this.value = null\" />\n </span>\n <span class=\"sub-btn\" @click=\"reply()\">提交</span>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { mapGetters } from \"vuex\";\nimport { Toast, MessageBox } from \"mint-ui\";\nimport axios from \"axios\";\nexport default {\n name: \"workorder_detail\",\n components: {},\n data() {\n return {\n isShowUploadLoading: false,\n isSubmit: false,\n workorder: {},\n comments: [],\n fileType: \"\",\n request: {\n source: \"\",\n content: \"\"\n }\n };\n },\n computed: {\n ...mapGetters([\n \"isShowHeader\",\n \"workorders\",\n \"userInfo\",\n \"workorderTypes\",\n \"uploadToken\"\n ])\n },\n created() {\n document.title = \"工单详细\";\n const id = this.$route.params.id;\n this.$store.commit(\"updateState\", { isShowPageLoading: true });\n axios.all([this.getWorkOrder(id), this.getComments(id)]).then(\n axios.spread(() => {\n this.$store.commit(\"updateState\", { isShowPageLoading: false });\n })\n );\n },\n methods: {\n getWorkOrder(id) {\n return axios\n .get(\"/public/workorder/\" + id)\n .then(response => {\n this.workorder = response.data.data;\n setTimeout(()=>this.$previewRefresh(), 200)\n })\n .catch(error => {\n console.log(error);\n });\n },\n getComments(id) {\n return axios\n .get(\"/public/workorder/comments/\" + id)\n .then(response => {\n if (response.data.data == null) return;\n this.comments = response.data.data;\n setTimeout(()=>this.$previewRefresh(), 200)\n })\n .catch(error => {\n console.log(error);\n });\n },\n reply() {\n const content = this.request.content + this.request.source;\n if (content.trim() == \"\") {\n Toast({\n message: \"请输入内容~\"\n });\n return;\n }\n if (this.isSubmit) return;\n this.isSubmit = true;\n const wid = this.workorder.id;\n axios\n .post(\"/public/workorder/reply\", { wid, content })\n .then(response => {\n this.isSubmit = false\n console.log(response);\n this.getComments(wid);\n this.request = {\n source: \"\",\n content: \"\"\n };\n document.querySelector(\".container\").scrollTop = 10000\n })\n .catch(error => {\n this.isSubmit = false\n console.log(error);\n Toast({\n message: \"提交失败~\"\n });\n });\n },\n inputBlur() {\n setTimeout(() => {\n document.body.scrollTo = 0;\n window.scrollTo(0, 0);\n }, 100);\n },\n uploadFile(e) {\n var fileDom = e.target;\n var file = fileDom.files[0];\n this.isShowUploadLoading = true;\n const self = this;\n this.$uploadFile({\n file,\n mode: this.uploadToken.mode,\n // 七牛才会执行\n percent() {},\n success(src) {\n\n self.isShowUploadLoading = false;\n var html\n var fullPath = self.uploadToken.host + \"/\" + src;\n var fileType = src.substr(src.lastIndexOf(\".\") + 1);\n if (\"jpg,jpeg,png,JPG,JPEG,PNG\".indexOf(fileType) != -1) {\n html = \"<br><img style='max-width:60%' preview='1' src='\" + fullPath + \"' />\"\n }else{\n html = \"<br><img style='width:20px;height:30px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />\"\n html += \"<a target='_blank' href='\"+fullPath+\"'>下载附件</a>\"\n }\n self.request.source = html\n Toast({\n message: \"上传成功~\"\n });\n },\n fail(e) {\n self.isShowUploadLoading = false;\n if (e.response && e.response.data) {\n Toast({\n message: e.response.data.message\n });\n return;\n }\n }\n });\n },\n close() {\n var wid = this.workorder.id;\n MessageBox.confirm(\"您确定关闭该工单吗?\").then(() => {\n axios\n .put(\"/public/workorder/close/\" + wid)\n .then(response => {\n console.log(response);\n Toast({\n message: \"工单已关闭~\"\n });\n this.getWorkOrder(wid);\n })\n .catch(error => {\n Toast({\n message: \"工单关闭失败~\"\n });\n console.log(error);\n });\n });\n },\n del() {\n var wid = this.workorder.id;\n MessageBox.confirm(\"您确定删除该工单吗?\").then(() => {\n axios\n .delete(\"/public/workorder/\" + wid)\n .then(response => {\n console.log(response);\n Toast({\n message: \"工单已删除~\"\n });\n setTimeout(() => this.$router.go(-1));\n })\n .catch(error => {\n Toast({\n message: \"工单关闭失败~\"\n });\n console.log(error);\n });\n });\n }\n }\n};\n</script>\n<style lang=\"stylus\" scoped>\n.container {\n height: 100vh;\n overflow: hidden;\n overflow-y: auto;\n}\n\n.content {\n padding-top: 50px;\n padding-bottom: 90px;\n\n .no-data {\n color: #666;\n font-size: 14px;\n }\n\n .workorder-close {\n text-align: center;\n color: #666;\n font-size: 14px;\n padding: 10px;\n }\n\n &.hide-header {\n padding-top: 0;\n }\n\n .head {\n margin: 0 10px;\n padding: 10px 0;\n border-bottom: 1px solid rgba(158, 158, 158, 0.13);\n\n .con {\n font-size: 15px;\n color: #333;\n display: flex;\n margin-bottom: 8px;\n\n span {\n flex-flow: 1;\n }\n\n span:first-child {\n flex-flow: 0;\n flex-shrink: 0;\n width: 45px;\n }\n\n i {\n font-style: normal;\n }\n }\n }\n\n .comments {\n padding: 10px;\n\n .item {\n display: flex;\n\n .avatar {\n padding-top: 10px;\n\n img {\n width: 30px;\n height: 30px;\n border-radius: 100px;\n display: block;\n }\n\n border-bottom: 1px solid rgba(158, 158, 158, 0.13);\n }\n\n .right {\n padding: 10px 5px;\n flex-grow: 1;\n border-bottom: 1px solid rgba(158, 158, 158, 0.13);\n\n .nickname {\n font-size: 15px;\n color: #333;\n }\n\n .detail {\n font-size: 15px;\n color: #333;\n margin-top: 5px;\n }\n\n .date {\n color: #999;\n font-size: 14px;\n margin-top: 5px;\n }\n }\n\n &:last-child {\n .right, .avatar {\n border-bottom: 0;\n }\n }\n }\n }\n\n .file-view {\n position: fixed;\n bottom: 80px;\n left: 0;\n right: 0;\n padding: 5px 10px;\n margin: 0 auto;\n font-size: 13px;\n color: #8bc34a;\n\n span {\n display: flex;\n align-content: center;\n align-items: center;\n\n img {\n width: 20px;\n height: 20px;\n }\n\n i {\n font-style: normal;\n margin-left: 5px;\n }\n }\n }\n\n .input-form {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n width: 100%;\n height: 80px;\n background-color: #fff;\n border-top: 1px solid rgba(158, 158, 158, 0.13);\n display: flex;\n justify-content: space-between;\n padding: 0 10px;\n box-sizing: border-box;\n align-content: center;\n align-items: center;\n\n textarea {\n height: 45px;\n flex-grow: 1;\n border-radius: 0;\n border: 0;\n color: #333;\n font-size: 14px;\n resize: none;\n }\n\n .icon-btn {\n background: url('./../assets/upload.png') center center no-repeat;\n background-size: 30px;\n width: 55px;\n height: 55px;\n overflow: hidden;\n\n input {\n display: block;\n width: 100%;\n height: 100%;\n font-size: 100px;\n opacity: 0;\n }\n }\n\n .sub-btn {\n display: block;\n width: 55px;\n height: 30px;\n color: #fff;\n line-height: 30px;\n text-align: center;\n border-radius: 3px;\n border: none;\n font-size: 14px;\n background: linear-gradient(to right, #26a2ff, #736cde);\n flex-shrink: 0;\n\n &:active {\n opacity: 0.8;\n }\n }\n }\n}\n</style>\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./workorder_detail.vue?vue&type=template&id=1d2064aa&scoped=true&\"\nimport script from \"./workorder_detail.vue?vue&type=script&lang=js&\"\nexport * from \"./workorder_detail.vue?vue&type=script&lang=js&\"\nimport style0 from \"./workorder_detail.vue?vue&type=style&index=0&id=1d2064aa&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1d2064aa\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=style&index=0&id=1d2064aa&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=style&index=0&id=1d2064aa&lang=stylus&scoped=true&\"","module.exports = \"data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7\""],"sourceRoot":""}
\ 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.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
File mode changed
...@@ -169,6 +169,7 @@ func init() { ...@@ -169,6 +169,7 @@ func init() {
beego.NSRouter("/type/:id", &controllers.WorkOrderController{}, "get:GetWorkType"), beego.NSRouter("/type/:id", &controllers.WorkOrderController{}, "get:GetWorkType"),
beego.NSRouter("/types", &controllers.WorkOrderController{}, "get:GetWorkTypes"), beego.NSRouter("/types", &controllers.WorkOrderController{}, "get:GetWorkTypes"),
beego.NSRouter("/close", &controllers.WorkOrderController{}, "post:CloseWorkOrder"), beego.NSRouter("/close", &controllers.WorkOrderController{}, "post:CloseWorkOrder"),
beego.NSRouter("/list", &controllers.WorkOrderController{}, "post:GetWorkOrders"),
), ),
) )
beego.AddNamespace(ns) beego.AddNamespace(ns)
......
...@@ -12,7 +12,7 @@ import ( ...@@ -12,7 +12,7 @@ import (
type ContactRepositoryInterface interface { type ContactRepositoryInterface interface {
GetContact(id int64) *models.Contact GetContact(id int64) *models.Contact
GetContacts(uid int64) ([]models.ContactDto, error) GetContacts(uid int64) ([]models.ContactDto, error)
UpdateIsSessionEnd(usersID []int64, isSessionEnd int) (int64, error) UpdateIsSessionEnd(uid int64) (int64, error)
Update(id int64, params *orm.Params) (int64, error) Update(id int64, params *orm.Params) (int64, error)
Delete(id int64, uid int64) (int64, error) Delete(id int64, uid int64) (int64, error)
DeleteAll(uid int64) (int64, error) DeleteAll(uid int64) (int64, error)
...@@ -85,8 +85,8 @@ func (r *ContactRepository) GetContactWithIds(ids ...int64) (*models.Contact, er ...@@ -85,8 +85,8 @@ func (r *ContactRepository) GetContactWithIds(ids ...int64) (*models.Contact, er
} }
// UpdateIsSessionEnd update // UpdateIsSessionEnd update
func (r *ContactRepository) UpdateIsSessionEnd(usersID []int64, isSessionEnd int) (int64, error) { func (r *ContactRepository) UpdateIsSessionEnd(uid int64) (int64, error) {
res, err := r.o.Raw("UPDATE contact SET is_session_end = 1 WHERE to_account IN(?,?) AND from_account IN(?,?)", usersID, usersID).Exec() res, err := r.o.Raw("UPDATE contact SET is_session_end = 1 WHERE from_account = ?", uid).Exec()
rows, _ := res.RowsAffected() rows, _ := res.RowsAffected()
if err != nil { if err != nil {
logs.Warn(" UpdateIsSessionEnd update------------", err) logs.Warn(" UpdateIsSessionEnd update------------", err)
......
...@@ -34,8 +34,8 @@ func GetUserRepositoryInstance() *UserRepository { ...@@ -34,8 +34,8 @@ func GetUserRepositoryInstance() *UserRepository {
} }
// CheckUsersLoginTimeOutAndSetOffline Check if user login timeout // CheckUsersLoginTimeOutAndSetOffline Check if user login timeout
func (r *UserRepository) CheckUsersLoginTimeOutAndSetOffline(lastMessageUnixTimer int64) int64 { func (r *UserRepository) CheckUsersLoginTimeOutAndSetOffline(userOffLineUnixTimer int64) int64 {
count, err := r.q.Filter("online__in", 1, 2).Filter("last_activity__lte", lastMessageUnixTimer).Update(orm.Params{ count, err := r.q.Filter("online__in", 1, 2).Filter("last_activity__lte", userOffLineUnixTimer).Update(orm.Params{
"online": 0, "online": 0,
"remote_addr": "", "remote_addr": "",
"token": "", "token": "",
......
...@@ -2,6 +2,7 @@ package services ...@@ -2,6 +2,7 @@ package services
import ( import (
"kefu_server/models" "kefu_server/models"
"strconv"
"time" "time"
"github.com/astaxie/beego/logs" "github.com/astaxie/beego/logs"
...@@ -10,6 +11,7 @@ import ( ...@@ -10,6 +11,7 @@ import (
// WorkOrderRepositoryInterface interface // WorkOrderRepositoryInterface interface
type WorkOrderRepositoryInterface interface { type WorkOrderRepositoryInterface interface {
GetWorkOrders(request models.WorkOrderPaginationDto) (models.WorkOrderPaginationDto, error)
GetWorkOrder(id int64) (models.WorkOrder, error) GetWorkOrder(id int64) (models.WorkOrder, error)
GetUserWorkOrders(uid int64) ([]models.WorkOrder, error) GetUserWorkOrders(uid int64) ([]models.WorkOrder, error)
Update(id int64, params *orm.Params) (int64, error) Update(id int64, params *orm.Params) (int64, error)
...@@ -70,6 +72,35 @@ func (r *WorkOrderRepository) GetWorkOrder(id int64) (models.WorkOrder, error) { ...@@ -70,6 +72,35 @@ func (r *WorkOrderRepository) GetWorkOrder(id int64) (models.WorkOrder, error) {
return workOrder, err return workOrder, err
} }
// GetWorkOrders get WorkOrders
func (r *WorkOrderRepository) GetWorkOrders(request models.WorkOrderPaginationDto) (models.WorkOrderPaginationDto, error) {
statusSQL := ""
if request.Status >= 0 {
statusSQL = " AND `status` = " + strconv.Itoa(request.Status) + " "
}
tidSQL := ""
if request.Tid != 0 {
tidSQL = " ADN `t_i_d` = " + strconv.FormatInt(request.Tid, 10) + " "
}
if request.PageSize == 0 {
request.PageSize = 10
}
if request.PageOn == 0 {
request.PageOn = 1
}
var maps []orm.Params
SQL := "SELECT *,t_i_d AS tid,c_i_d AS cid FROM (SELECT w.*,u.nickname FROM work_order w LEFT JOIN (SELECT id, nickname FROM `user`) u ON w.uid = u.id) w WHERE `delete` = 0 " + statusSQL + tidSQL + " ORDER BY id,create_at,update_at DESC"
_, err := r.o.Raw(SQL+" LIMIT ? OFFSET ?", request.PageSize, (request.PageOn-1)*request.PageSize).Values(&maps)
if err != nil {
logs.Warn("GetWorkOrders get WorkOrders------------", err)
request.List = []int{}
}
total, _ := r.o.Raw(SQL).Values(&maps)
request.List = maps
request.Total = total
return request, err
}
// Delete delete WorkOrder // Delete delete WorkOrder
func (r *WorkOrderRepository) Delete(id int64) (int64, error) { func (r *WorkOrderRepository) Delete(id int64) (int64, error) {
row, err := r.q.Filter("id", id).Update(orm.Params{ row, err := r.q.Filter("id", id).Update(orm.Params{
......
...@@ -14,7 +14,7 @@ import ( ...@@ -14,7 +14,7 @@ import (
func appTask() { func appTask() {
// Task scheduling (will be executed once every 5 minute) // Task scheduling (will be executed once every 5 minute)
checkOnLineTk := toolbox.NewTask("checkOnLine", "0 */5 * * * *", func() error { checkOnLineTk := toolbox.NewTask("checkOnLine", "0 */1 * * * *", func() error {
// timers // timers
userOffLineUnixTimer := time.Now().Unix() - (60 * 10) // User's last activity time T out online status rule userOffLineUnixTimer := time.Now().Unix() - (60 * 10) // User's last activity time T out online status rule
...@@ -22,7 +22,7 @@ func appTask() { ...@@ -22,7 +22,7 @@ func appTask() {
lastMessageUnixTimer := time.Now().Unix() - (60 * 8) // Determine if the user will not use it for a certain period of time and force them to go offline lastMessageUnixTimer := time.Now().Unix() - (60 * 8) // Determine if the user will not use it for a certain period of time and force them to go offline
// user // user
userOfflineCount := services.GetUserRepositoryInstance().CheckUsersLoginTimeOutAndSetOffline(lastMessageUnixTimer) userOfflineCount := services.GetUserRepositoryInstance().CheckUsersLoginTimeOutAndSetOffline(userOffLineUnixTimer)
logs.Info("清理登录超时user", userOfflineCount, "个被强制下线") logs.Info("清理登录超时user", userOfflineCount, "个被强制下线")
// admin // admin
...@@ -39,6 +39,9 @@ func appTask() { ...@@ -39,6 +39,9 @@ func appTask() {
logs.Info("清理会话超时用户,有", len(contacts), "个被结束对话") logs.Info("清理会话超时用户,有", len(contacts), "个被结束对话")
for _, contact := range contacts { for _, contact := range contacts {
// set end is session end
services.GetContactRepositoryInstance().UpdateIsSessionEnd(contact.FromAccount)
// Does not handle customer service // Does not handle customer service
if admin := services.GetAdminRepositoryInstance().GetAdmin(contact.FromAccount); admin != nil { if admin := services.GetAdminRepositoryInstance().GetAdmin(contact.FromAccount); admin != nil {
continue continue
...@@ -61,9 +64,10 @@ func appTask() { ...@@ -61,9 +64,10 @@ func appTask() {
var messageString string var messageString string
messageString = utils.InterfaceToString(message) messageString = utils.InterfaceToString(message)
utils.PushMessage(contact.FromAccount, messageString) utils.PushMessage(contact.FromAccount, messageString)
utils.MessageInto(message)
// Send a reminder message to customer service // Send a reminder message to customer service
message.FromAccount = contact.FromAccount message.FromAccount = robot.ID
message.ToAccount = contact.ToAccount message.ToAccount = contact.ToAccount
message.Payload = "用户长时间无应答,会话结束" message.Payload = "用户长时间无应答,会话结束"
if _lastBackAdmin == nil { if _lastBackAdmin == nil {
......
...@@ -24,6 +24,14 @@ ...@@ -24,6 +24,14 @@
</div> </div>
</el-badge> </el-badge>
</el-menu-item> </el-menu-item>
<el-menu-item index="/workorder">
<el-badge :hidden="$store.getters.readCount == 0" :value="$store.getters.readCount" :max="99" style="width: 100%;">
<div>
<i class="el-icon-tickets"></i>
<span slot="title">工单系统</span>
</div>
</el-badge>
</el-menu-item>
<el-menu-item index="/knowledge"> <el-menu-item index="/knowledge">
<i class="el-icon-reading"></i> <i class="el-icon-reading"></i>
<span slot="title">知识库</span> <span slot="title">知识库</span>
...@@ -89,6 +97,9 @@ export default { ...@@ -89,6 +97,9 @@ export default {
case "/customer": case "/customer":
title = "客服管理" title = "客服管理"
break break
case "/workorder":
title = "工单管理"
break
case "/users": case "/users":
title = "用户管理" title = "用户管理"
break break
......
...@@ -14,7 +14,7 @@ moment.locale("zh-cn", momentLocal) ...@@ -14,7 +14,7 @@ moment.locale("zh-cn", momentLocal)
import axios from 'axios' import axios from 'axios'
axios.defaults.baseURL = '/v1' axios.defaults.baseURL = '/api'
// 添加请求拦截器 // 添加请求拦截器
axios.interceptors.request.use((config) => { axios.interceptors.request.use((config) => {
......
...@@ -45,6 +45,10 @@ export default new Router({ ...@@ -45,6 +45,10 @@ export default new Router({
path: 'chat_record', path: 'chat_record',
component: () => import('./views/record/index.vue') component: () => import('./views/record/index.vue')
}, },
{
path: 'workorder',
component: () => import('./views/workorder/index.vue')
}
] ]
}, },
{ {
......
...@@ -3,84 +3,62 @@ ...@@ -3,84 +3,62 @@
<div class="me-head"> <div class="me-head">
<span> <span>
<i class="el-icon-reading"></i> <i class="el-icon-reading"></i>
<span slot="title">知识库管理 </span> <span slot="title">知识库管理</span>
</span> </span>
<el-button-group> <el-button-group>
<template v-for="item in total" > <template v-for="item in total">
<el-button :class="{'el-button--primary': item.id + '' == tableData.platform + ''}" @click="onTogglePlatform(item.id)" :key="item.id" size="mini"> <el-button
{{item.title}} ({{item.count}}) :class="{'el-button--primary': item.id + '' == tableData.platform + ''}"
</el-button> @click="onTogglePlatform(item.id)"
:key="item.id"
size="mini"
>{{item.title}} ({{item.count}})</el-button>
</template> </template>
</el-button-group> </el-button-group>
<el-col :span="5"> <el-col :span="5">
<el-input @change="onRefresh" placeholder="请输入关键词" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> <el-input
@change="onRefresh"
placeholder="请输入关键词"
prefix-icon="el-icon-search"
v-model="keyword"
clearable
></el-input>
</el-col> </el-col>
<el-button @click="createDialogFormVisible = true" size="mini">添 加</el-button> <el-button @click="createDialogFormVisible = true" size="mini">添 加</el-button>
</div> </div>
<el-divider /> <el-divider />
<el-table <el-table :data="tableData.list" style="width: 100%" v-loading="loading">
:data="tableData.list" <el-table-column type="index" :index="indexMethod" width="60"></el-table-column>
style="width: 100%" <el-table-column prop="title" label="主标题"></el-table-column>
v-loading="loading" <el-table-column prop="sub_title" label="子标题">
>
<el-table-column
type="index"
:index="indexMethod"
width="60">
</el-table-column>
<el-table-column
prop="title"
label="主标题">
</el-table-column>
<el-table-column
prop="sub_title"
label="子标题">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.sub_title != ''"> <div v-if="scope.row.sub_title != ''">
<div style="font-size: 13px;" :key="key" v-for="(item, key) in scope.row.sub_title.split('|')"> <div
{{key+1}}.{{item}} style="font-size: 13px;"
</div> :key="key"
v-for="(item, key) in scope.row.sub_title.split('|')"
>{{key+1}}.{{item}}</div>
</div> </div>
<div v-else>-----</div> <div v-else>-----</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="content" label="内容">
prop="content"
label="内容">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="font-size: 13px;" :key="key" v-for='(item, key) in scope.row.content.split("\n")'> <div style="font-size: 13px;" :key="index" v-for="(item, index) in scope.row.content.split('\n')">{{item}}</div>
{{item}}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="platform" align="center" label="匹配平台">
prop="platform"
align="center"
label="匹配平台">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag>{{$getPlatformItem(scope.row.platform).title}}</el-tag> <el-tag>{{$getPlatformItem(scope.row.platform).title}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="create_at" label="创建时间">
prop="create_at" <template slot-scope="scope">{{$formatUnixDate(scope.row.create_at, "YYYY/MM/DD")}}</template>
label="创建时间">
<template slot-scope="scope">
{{$formatUnixDate(scope.row.create_at, "YYYY/MM/DD")}}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="operating" align="center" width="150" label="操作">
prop="operating"
align="center"
width="150"
label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" @click="edit(scope.row)">编 辑</el-button>
size="mini" <el-button size="mini" type="danger" @click="deleteKnowledge(scope.row)">删 除</el-button>
@click="edit(scope.row)">编 辑</el-button>
<el-button
size="mini"
type="danger"
@click="deleteKnowledge(scope.row)">删 除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -93,18 +71,22 @@ ...@@ -93,18 +71,22 @@
layout="sizes, prev, pager, next" layout="sizes, prev, pager, next"
:current-page="tableData.page_on" :current-page="tableData.page_on"
:page-sizes="[5, 10, 15, 20]" :page-sizes="[5, 10, 15, 20]"
:total="tableData.total"> :total="tableData.total"
</el-pagination> ></el-pagination>
</el-row> </el-row>
<CreateDialog :complete="onRefresh" :dialogFormVisible.sync="createDialogFormVisible" /> <CreateDialog :complete="onRefresh" :dialogFormVisible.sync="createDialogFormVisible" />
<EditDialog :formData="editItem" :complete="onRefresh" :dialogFormVisible.sync="editDialogFormVisible" /> <EditDialog
:formData="editItem"
:complete="onRefresh"
:dialogFormVisible.sync="editDialogFormVisible"
/>
</div> </div>
</template> </template>
<script> <script>
import CreateDialog from "./create" import CreateDialog from "./create";
import EditDialog from "./edit" import EditDialog from "./edit";
import axios from 'axios' import axios from "axios";
export default { export default {
name: "knowledge", name: "knowledge",
components: { components: {
...@@ -120,110 +102,113 @@ export default { ...@@ -120,110 +102,113 @@ export default {
page_size: 10, page_size: 10,
total: 0, total: 0,
keyword: "", keyword: "",
platform: 1, platform: 1
}, },
total: [], total: [],
createDialogFormVisible: false, createDialogFormVisible: false,
editDialogFormVisible: false, editDialogFormVisible: false,
loading: true, loading: true,
editItem: null editItem: null
} };
}, },
computed: { computed: {
platformConfig(){ platformConfig() {
return this.$store.state.platformConfig || [] return this.$store.state.platformConfig || [];
} }
}, },
created(){ created() {
setTimeout( ()=> { setTimeout(() => {
this.getKnowledgeList() this.getKnowledgeList();
this.getTotal() this.getTotal();
}, 500) }, 500);
}, },
methods: { methods: {
onRefresh(){ onRefresh() {
this.getTotal() this.getTotal();
this.getKnowledgeList() this.getKnowledgeList();
}, },
// 行号 // 行号
indexMethod(index) { indexMethod(index) {
return (this.tableData.page_on - 1) * this.tableData.page_size + index +1; return (
(this.tableData.page_on - 1) * this.tableData.page_size + index + 1
);
}, },
// 删除 // 删除
deleteKnowledge(item){ deleteKnowledge(item) {
this.$confirm('您确定要删除该知识库吗? 删除后不可恢复!', '温馨提示!', { this.$confirm("您确定要删除该知识库吗? 删除后不可恢复!", "温馨提示!", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
center: true, center: true,
type: 'warning' type: "warning"
}).then(() => { }).then(() => {
axios.delete('/knowledge/' + item.id) axios
.delete("/knowledge/" + item.id)
.then(response => { .then(response => {
console.log(response.data) console.log(response.data);
this.$message.success("删除成功") this.$message.success("删除成功");
this.getKnowledgeList(1) this.getKnowledgeList(1);
}) })
.catch(error => { .catch(error => {
this.$message.error(error.response.data.message) this.$message.error(error.response.data.message);
});
}); });
})
}, },
// 切换显示平台 // 切换显示平台
onTogglePlatform(pid){ onTogglePlatform(pid) {
this.tableData.platform = parseInt(pid) this.tableData.platform = parseInt(pid);
this.getKnowledgeList(1) this.getKnowledgeList(1);
}, },
// 编辑 // 编辑
edit(item){ edit(item) {
this.editItem = item this.editItem = item;
this.editDialogFormVisible = true this.editDialogFormVisible = true;
}, },
// 改变每页条数 // 改变每页条数
handleSizeChange(val) { handleSizeChange(val) {
this.tableData.page_size = val this.tableData.page_size = val;
this.getKnowledgeList() this.getKnowledgeList();
}, },
// 分页 // 分页
handleCurrentChange(val) { handleCurrentChange(val) {
this.tableData.page_on = val this.tableData.page_on = val;
this.getKnowledgeList() this.getKnowledgeList();
}, },
// 获取数据 // 获取数据
getKnowledgeList(index){ getKnowledgeList(index) {
if(index) this.tableData.page_on = index if (index) this.tableData.page_on = index;
const {page_on, page_size, platform} = this.tableData const { page_on, page_size, platform } = this.tableData;
const keyword = this.keyword const keyword = this.keyword;
axios.post('/knowledge/list', {page_on, page_size, platform, keyword}) axios
.post("/knowledge/list", { page_on, page_size, platform, keyword })
.then(response => { .then(response => {
this.loading = false this.loading = false;
this.tableData = response.data.data this.tableData = response.data.data;
}) })
.catch(error => { .catch(error => {
this.loading = false this.loading = false;
this.$message.error(error.response.data.message) this.$message.error(error.response.data.message);
}); });
}, },
// 获取统计数据 // 获取统计数据
getTotal(){ getTotal() {
axios.get('/knowledge/total') axios.get("/knowledge/total").then(response => {
.then(response => { this.total = response.data.data;
this.total = response.data.data });
}) }
}, }
},
}; };
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.me-head{ .me-head {
height 30px height: 30px;
display flex display: flex;
align-items center align-items: center;
font-size 20px font-size: 20px;
justify-content space-between justify-content: space-between;
color #666 color: #666;
i{
margin-right 5px i {
} margin-right: 5px;
} }
}
</style> </style>
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
<div class="mini-im-chat-message-box" :class="{'self': item.from_account != seviceCurrentUser.id}" v-for="(item, index) in messages" :key="index"> <div class="mini-im-chat-message-box" :class="{'self': item.from_account != seviceCurrentUser.id}" v-for="(item, index) in messages" :key="index">
<!-- 用户信息 --> <!-- 用户信息 -->
<template v-if="item.biz_type == 'text' || item.biz_type == 'photo' || item.biz_type == 'knowledge' || item.biz_type == 'knowledge_list'"> <template v-if="item.biz_type == 'text' || item.biz_type == 'photo' || item.biz_type == 'knowledge' || item.biz_type == 'knowledge_list'">
<div class="user-date"> <div class="user-date">
......
<template>
<div>
<div class="me-head">
<span>
<i class="el-icon-tickets"></i>
<span slot="title">工单系统</span>
</span>
<el-button size="mini">设置</el-button>
</div>
<el-divider />
<el-table :data="tableData.list" style="width: 100%" v-loading="loading">
<el-table-column type="index" :index="indexMethod" width="60"></el-table-column>
<el-table-column prop="nickname" label="用户"></el-table-column>
<el-table-column prop="title" label="工单标题"></el-table-column>
<el-table-column prop="status" label="当前状态">
<template slot-scope="scope">
<el-tag type="warning" v-if="scope.row.status == 0">待处理</el-tag>
<el-tag type="warning" v-if="scope.row.status == 1">待回复</el-tag>
<el-tag type="success" v-if="scope.row.status == 2">已回复</el-tag>
<el-tag type="info" v-if="scope.row.status == 3">已结束</el-tag>
</template>
</el-table-column>
<el-table-column prop="create_at" label="创建时间">
<template slot-scope="scope">{{$formatUnixDate(scope.row.create_at, "YYYY/MM/DD")}}</template>
</el-table-column>
<el-table-column prop="operating" align="center" width="150" label="操作">
<template>
<el-button size="mini">查 看</el-button>
</template>
</el-table-column>
</el-table>
<el-row type="flex" style="margin-top: 20px;" justify="space-between">
<span style="color:#666;font-size: 14px;">共找到{{tableData.total}}条数据</span>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
layout="sizes, prev, pager, next"
:current-page="tableData.page_on"
:page-sizes="[5, 10, 15, 20]"
:total="tableData.total"
></el-pagination>
</el-row>
</div>
</template>
<script>
import axios from "axios";
export default {
name: 'workorder-index',
data(){
return {
loading: true,
tableData: {
list: [],
page_on: 1,
page_size: 10,
total: 0,
status: -1,
tid: 0,
},
}
},
created() {
setTimeout(() => {
this.getWorkorderList();
}, 500);
},
methods: {
// 行号
indexMethod(index) {
return (
(this.tableData.page_on - 1) * this.tableData.page_size + index + 1
);
},
// 获取数据
getWorkorderList(index) {
if (index) this.tableData.page_on = index;
const { page_on, page_size, tid, status } = this.tableData;
axios
.post("/workorder/list", { page_on, page_size, tid, status })
.then(response => {
this.loading = false;
this.tableData = response.data.data;
})
.catch(error => {
this.loading = false;
this.$message.error(error.response.data.message);
});
},
// 改变每页条数
handleSizeChange(val) {
this.tableData.page_size = val;
this.getKnowledgeList();
},
// 分页
handleCurrentChange(val) {
this.tableData.page_on = val;
this.getKnowledgeList();
},
}
}
</script>
<style scoped lang="stylus">
.me-head {
height: 30px;
display: flex;
align-items: center;
font-size: 20px;
justify-content: space-between;
color: #666;
i {
margin-right: 5px;
}
}
</style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</mt-button> </mt-button>
</mt-header> </mt-header>
<div class="list" :class="{'hide-header': !isShowHeader}"> <div class="list" :class="{'hide-header': !isShowHeader}">
<div class="no-data" v-if="workorders.lenght <= 0"> <div class="no-data" v-if="workorders.length <= 0">
<img src="../assets/workorder.png" alt=""> <img src="../assets/workorder.png" alt="">
<div>您还没有发布过工单~</div> <div>您还没有发布过工单~</div>
</div> </div>
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
} }
div{ div{
color #666 color #666
font-size 12px font-size 14px
} }
} }
.list{ .list{
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
</div> </div>
<div class="field-line arrow-right file"> <div class="field-line arrow-right file">
<span>附件:</span> <span>附件:</span>
<span>{{file || '上传附件'}}</span> <span :class="{'ed': source != ''}">{{source ? '已上传附件,重新上传可替换~' : '上传附件'}}</span>
<input type="file" /> <input type="file" @change="uploadFile" />
</div> </div>
<span class="sub-btn" @click="submit()">提交</span> <span class="sub-btn" @click="submit()">提交</span>
</div> </div>
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
"email": "" "email": ""
}, },
selectTyped: "", selectTyped: "",
file: "", source: "",
isShowTypesPicker: false isShowTypesPicker: false
}; };
}, },
...@@ -113,6 +113,44 @@ export default { ...@@ -113,6 +113,44 @@ export default {
} }
console.log(_) console.log(_)
}, },
uploadFile(e) {
var fileDom = e.target;
var file = fileDom.files[0];
this.isShowUploadLoading = true;
const self = this;
this.$uploadFile({
file,
mode: this.uploadToken.mode,
// 七牛才会执行
percent() {},
success(src) {
self.isShowUploadLoading = false;
var html
var fullPath = self.uploadToken.host + "/" + src;
var fileType = src.substr(src.lastIndexOf(".") + 1);
if ("jpg,jpeg,png,JPG,JPEG,PNG".indexOf(fileType) != -1) {
html = "<br><img style='max-width:60%' preview='1' src='" + fullPath + "' />"
}else{
html = "<br><img style='width:20px;height:30px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />"
html += "<a target='_blank' href='"+fullPath+"'>下载附件</a>"
}
self.source = html
Toast({
message: "上传成功~"
});
},
fail(e) {
self.isShowUploadLoading = false;
if (e.response && e.response.data) {
Toast({
message: e.response.data.message
});
return;
}
}
});
},
submit(){ submit(){
if(this.request.tid == 0){ if(this.request.tid == 0){
Toast({ Toast({
...@@ -134,6 +172,7 @@ export default { ...@@ -134,6 +172,7 @@ export default {
} }
if(this.isSubmit) return if(this.isSubmit) return
this.isSubmit = true this.isSubmit = true
this.request.content += this.source
axios axios
.post("/public/workorder/create", this.request) .post("/public/workorder/create", this.request)
.then(response => { .then(response => {
...@@ -194,6 +233,9 @@ export default { ...@@ -194,6 +233,9 @@ export default {
overflow hidden overflow hidden
margin-top 20px margin-top 20px
border-top 1px solid #ddd border-top 1px solid #ddd
.ed{
color #8bc34a
}
input{ input{
font-size 100px font-size 100px
opacity 0 opacity 0
......
...@@ -58,14 +58,14 @@ ...@@ -58,14 +58,14 @@
<div class="right"> <div class="right">
<div class="nickname" v-if="item.aid == '0'"></div> <div class="nickname" v-if="item.aid == '0'"></div>
<div class="nickname" v-else>{{item.nickname}}</div> <div class="nickname" v-else>{{item.nickname}}</div>
<div class="detail" v-html="commentView(item.content)"></div> <div class="detail" v-html="item.content"></div>
<div class="date">{{$formatDate(item.create_at)}}</div> <div class="date">{{$formatDate(item.create_at)}}</div>
</div> </div>
</div> </div>
</template> </template>
<div class="workorder-close" v-if="workorder.status == 3">工单已结束~</div> <div class="workorder-close" v-if="workorder.status == 3">工单已结束~</div>
</div> </div>
<div class="file-view" v-if="request.file != '' || isShowUploadLoading"> <div class="file-view" v-if="request.source != '' || isShowUploadLoading">
<span v-if="isShowUploadLoading"> <span v-if="isShowUploadLoading">
<img src="./../assets/loading.gif" alt /> <img src="./../assets/loading.gif" alt />
<i>上传中~</i> <i>上传中~</i>
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
comments: [], comments: [],
fileType: "", fileType: "",
request: { request: {
file: "", source: "",
content: "" content: ""
} }
}; };
...@@ -125,24 +125,12 @@ export default { ...@@ -125,24 +125,12 @@ export default {
); );
}, },
methods: { methods: {
commentView(comment) {
var res = comment.match(/\[file=(.*)\]/);
if (res == null) return comment;
var fileType = res[1].substr(res[1].lastIndexOf(".") + 1);
if ("jpg,jpeg,png,JPG,JPEG,PNG".indexOf(fileType) != -1) {
comment = comment.replace(
res[0],
"<br><img style='max-width:60%' preview='1' src='" + res[1] + "' />"
);
this.$previewRefresh();
}
return comment;
},
getWorkOrder(id) { getWorkOrder(id) {
return axios return axios
.get("/public/workorder/" + id) .get("/public/workorder/" + id)
.then(response => { .then(response => {
this.workorder = response.data.data; this.workorder = response.data.data;
setTimeout(()=>this.$previewRefresh(), 200)
}) })
.catch(error => { .catch(error => {
console.log(error); console.log(error);
...@@ -154,13 +142,14 @@ export default { ...@@ -154,13 +142,14 @@ export default {
.then(response => { .then(response => {
if (response.data.data == null) return; if (response.data.data == null) return;
this.comments = response.data.data; this.comments = response.data.data;
setTimeout(()=>this.$previewRefresh(), 200)
}) })
.catch(error => { .catch(error => {
console.log(error); console.log(error);
}); });
}, },
reply() { reply() {
const content = this.request.content + this.request.file; const content = this.request.content + this.request.source;
if (content.trim() == "") { if (content.trim() == "") {
Toast({ Toast({
message: "请输入内容~" message: "请输入内容~"
...@@ -177,9 +166,10 @@ export default { ...@@ -177,9 +166,10 @@ export default {
console.log(response); console.log(response);
this.getComments(wid); this.getComments(wid);
this.request = { this.request = {
file: "", source: "",
content: "" content: ""
}; };
document.querySelector(".container").scrollTop = 10000
}) })
.catch(error => { .catch(error => {
this.isSubmit = false this.isSubmit = false
...@@ -206,9 +196,21 @@ export default { ...@@ -206,9 +196,21 @@ export default {
// 七牛才会执行 // 七牛才会执行
percent() {}, percent() {},
success(src) { success(src) {
self.request.file =
"[file=" + self.uploadToken.host + "/" + src + "]";
self.isShowUploadLoading = false; self.isShowUploadLoading = false;
var html
var fullPath = self.uploadToken.host + "/" + src;
var fileType = src.substr(src.lastIndexOf(".") + 1);
if ("jpg,jpeg,png,JPG,JPEG,PNG".indexOf(fileType) != -1) {
html = "<br><img style='max-width:60%' preview='1' src='" + fullPath + "' />"
}else{
html = "<br><img style='width:20px;height:30px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />"
html += "<a target='_blank' href='"+fullPath+"'>下载附件</a>"
}
self.request.source = html
Toast({
message: "上传成功~"
});
}, },
fail(e) { fail(e) {
self.isShowUploadLoading = false; self.isShowUploadLoading = false;
......
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