Commit b5c1cfa1 by keith

update code

parent 75a031ef
Showing with 64 additions and 57 deletions
...@@ -15,9 +15,9 @@ kefu_client_url = "http://localhost:8080" ...@@ -15,9 +15,9 @@ kefu_client_url = "http://localhost:8080"
static_host = "http://localhost:8080" static_host = "http://localhost:8080"
# 进程监控 # 进程监控
EnableAdmin = false # EnableAdmin = false
AdminAddr = "localhost" # AdminAddr = "localhost"
AdminPort = 8089 # AdminPort = 8089
# 小米mimc open api URL # 小米mimc open api URL
mimc_HttpUrl = "https://mimc.chat.xiaomi.net/api/account/token" mimc_HttpUrl = "https://mimc.chat.xiaomi.net/api/account/token"
......
...@@ -44,9 +44,6 @@ func (c *BaseController) JSON(status configs.ResponseStatusType, message string, ...@@ -44,9 +44,6 @@ func (c *BaseController) JSON(status configs.ResponseStatusType, message string,
// GetAdminAuthInfo get current anth admin that AuthInfo // GetAdminAuthInfo get current anth admin that AuthInfo
func (c *BaseController) GetAdminAuthInfo() *models.Auths { func (c *BaseController) GetAdminAuthInfo() *models.Auths {
token := c.Ctx.Input.Header("Authorization") token := c.Ctx.Input.Header("Authorization")
if token == "" {
c.JSON(configs.ResponseFail, "用户效验失败!", nil)
}
var authsRepository = services.GetAuthsRepositoryInstance() var authsRepository = services.GetAuthsRepositoryInstance()
auth := authsRepository.GetAdminAuthInfo(token) auth := authsRepository.GetAdminAuthInfo(token)
if auth == nil { if auth == nil {
......
...@@ -104,9 +104,9 @@ func (c *PublicController) Register() { ...@@ -104,9 +104,9 @@ func (c *PublicController) Register() {
if user != nil { if user != nil {
// The last login address is inconsistent with this time and the token is not empty // The last login address is inconsistent with this time and the token is not empty
if user.Token != "" && user.RemoteAddr != "" && currentRemoteAddr != user.RemoteAddr { // if user.Token != "" && user.RemoteAddr != "" && currentRemoteAddr != user.RemoteAddr {
c.JSON(configs.ResponseFail, "注册失败,请稍等重试!", "") // c.JSON(configs.ResponseFail, "注册失败,请稍等重试!", "")
} // }
// fetchResult // fetchResult
fetchResult, fetchError = utils.CreateMiMcToken(strconv.FormatInt(user.ID, 10)) fetchResult, fetchError = utils.CreateMiMcToken(strconv.FormatInt(user.ID, 10))
......
...@@ -13,7 +13,7 @@ type User struct { ...@@ -13,7 +13,7 @@ type User struct {
Platform int64 `orm:"type(bigint);column(platform)" json:"platform"` // 用户所在渠道(平台) Platform int64 `orm:"type(bigint);column(platform)" json:"platform"` // 用户所在渠道(平台)
Online int `orm:"default(0);column(online)" json:"online"` // 用户是否在线 Online int `orm:"default(0);column(online)" json:"online"` // 用户是否在线
RemoteAddr string `orm:"type(char);null;column(remote_addr)" json:"remote_addr"` // 用户当次登录地址 RemoteAddr string `orm:"type(char);null;column(remote_addr)" json:"remote_addr"` // 用户当次登录地址
IsWindow int `orm:"default(0);column(is_window)" json:"is_window"` // 是否在聊天窗口 IsWindow int `orm:"default(0);column(is_window)" json:"is_window"` // 是否在聊天窗口,0 不在, 1在
UpdateAt int64 `orm:"type(bigint);column(update_at)" json:"update_at"` // 用户资料被更新时间 UpdateAt int64 `orm:"type(bigint);column(update_at)" json:"update_at"` // 用户资料被更新时间
Remarks string `orm:"type(char);null;column(remarks)" json:"remarks"` // 备注 Remarks string `orm:"type(char);null;column(remarks)" json:"remarks"` // 备注
LastActivity int64 `orm:"type(bigint);column(last_activity)" json:"last_activity"` // 最后活动时间 LastActivity int64 `orm:"type(bigint);column(last_activity)" json:"last_activity"` // 最后活动时间
......
File mode changed
.mini-im-home-title[data-v-046eea91]{text-align:center;font-size:18px;color:#666;padding:15px 0 50px}.mini-im-home-copyright[data-v-046eea91]{text-align:center;color:#666;font-size:14px;padding-top:50px}.online-count[data-v-046eea91]{text-align:center;color:#666;margin-top:10px}.online-count span[data-v-046eea91]{color:#8bc34a;margin:0 5px}
\ No newline at end of file
.el-tag+.el-tag[data-v-015f50bf]{margin-left:10px}.button-new-tag[data-v-015f50bf]{margin-left:10px;height:32px;line-height:30px;padding-top:0;padding-bottom:0}.input-new-tag[data-v-015f50bf]{width:150px;margin-left:10px;vertical-align:bottom}.el-tag+.el-tag[data-v-7b12f7d6]{margin-left:10px}.button-new-tag[data-v-7b12f7d6]{margin-left:10px;height:32px;line-height:30px;padding-top:0;padding-bottom:0}.input-new-tag[data-v-7b12f7d6]{width:150px;margin-left:10px;vertical-align:bottom}.me-head[data-v-e6cb2868]{height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:20px;-ms-flex-pack:justify;justify-content:space-between;color:#666}.me-head i[data-v-e6cb2868]{margin-right:5px} .el-tag+.el-tag[data-v-015f50bf]{margin-left:10px}.button-new-tag[data-v-015f50bf]{margin-left:10px;height:32px;line-height:30px;padding-top:0;padding-bottom:0}.input-new-tag[data-v-015f50bf]{width:150px;margin-left:10px;vertical-align:bottom}.el-tag+.el-tag[data-v-7b12f7d6]{margin-left:10px}.button-new-tag[data-v-7b12f7d6]{margin-left:10px;height:32px;line-height:30px;padding-top:0;padding-bottom:0}.input-new-tag[data-v-7b12f7d6]{width:150px;margin-left:10px;vertical-align:bottom}.me-head[data-v-22f8e0fa]{height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:20px;-ms-flex-pack:justify;justify-content:space-between;color:#666}.me-head i[data-v-22f8e0fa]{margin-right:5px}
\ No newline at end of file \ No newline at end of file
.mini-im-file-button[data-v-6bfc8d44]{width:50px;height:50px;border-radius:50%;position:relative;overflow:hidden;cursor:pointer}.mini-im-file-button input[data-v-6bfc8d44]{font-size:100px;position:absolute;top:0;left:0;cursor:pointer;opacity:0}.mini-im-file-button .mini-im-file-percent[data-v-6bfc8d44]{position:absolute;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:50%;background-color:rgba(0,0,0,.5);color:#fff;font-size:12px}.mini-im-head[data-v-d2bb02c0]{height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:20px;-ms-flex-pack:justify;justify-content:space-between;color:#666}.mini-im-head i[data-v-d2bb02c0]{margin-right:5px} .mini-im-file-button[data-v-6bfc8d44]{width:50px;height:50px;border-radius:50%;position:relative;overflow:hidden;cursor:pointer}.mini-im-file-button input[data-v-6bfc8d44]{font-size:100px;position:absolute;top:0;left:0;cursor:pointer;opacity:0}.mini-im-file-button .mini-im-file-percent[data-v-6bfc8d44]{position:absolute;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:50%;background-color:rgba(0,0,0,.5);color:#fff;font-size:12px}.mini-im-head[data-v-3a13145a]{height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:20px;-ms-flex-pack:justify;justify-content:space-between;color:#666}.mini-im-head i[data-v-3a13145a]{margin-right:5px}
\ No newline at end of file \ No newline at end of file
.mini-im-file-button[data-v-3e845274]{width:50px;height:50px;border-radius:50%;position:relative;overflow:hidden;cursor:pointer}.mini-im-file-button input[data-v-3e845274]{font-size:100px;position:absolute;top:0;left:0;cursor:pointer;opacity:0}.mini-im-file-button .mini-im-file-percent[data-v-3e845274]{position:absolute;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:50%;background-color:rgba(0,0,0,.5);color:#fff;font-size:12px}.mini-im-head[data-v-0aee8f9a]{height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:20px;-ms-flex-pack:justify;justify-content:space-between;color:#666}.mini-im-head i[data-v-0aee8f9a]{margin-right:5px}.el-select .el-input[data-v-0aee8f9a]{width:130px}.input-with-select .el-input-group__prepend[data-v-0aee8f9a]{background-color:#fff} .mini-im-file-button[data-v-3e845274]{width:50px;height:50px;border-radius:50%;position:relative;overflow:hidden;cursor:pointer}.mini-im-file-button input[data-v-3e845274]{font-size:100px;position:absolute;top:0;left:0;cursor:pointer;opacity:0}.mini-im-file-button .mini-im-file-percent[data-v-3e845274]{position:absolute;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:50%;background-color:rgba(0,0,0,.5);color:#fff;font-size:12px}.mini-im-head[data-v-65c494d4]{height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:20px;-ms-flex-pack:justify;justify-content:space-between;color:#666}.mini-im-head i[data-v-65c494d4]{margin-right:5px}.el-select .el-input[data-v-65c494d4]{width:130px}.input-with-select .el-input-group__prepend[data-v-65c494d4]{background-color:#fff}
\ No newline at end of file \ No newline at end of file
.mini-im-home-title[data-v-66efe601]{text-align:center;font-size:18px;color:#666;padding:15px 0 50px}.mini-im-home-copyright[data-v-66efe601]{text-align:center;color:#666;font-size:14px;padding-top:50px}.online-count[data-v-66efe601]{text-align:center;color:#666;margin-top:10px}.online-count span[data-v-66efe601]{color:#8bc34a;margin:0 5px}
\ No newline at end of file
.workorder-view[data-v-04313ef6]{width:100vw;height:100vh;position:fixed;right:0;top:0;left:0;background-color:rgba(0,0,0,.8);z-index:9}.workorder-view .mask[data-v-04313ef6]{width:100%;height:100%}.workorder-view .no-data[data-v-04313ef6]{color:#666;font-size:14px}.workorder-view .comments-loading[data-v-04313ef6],.workorder-view .workorder-close[data-v-04313ef6]{text-align:center;color:#666;font-size:14px;padding:10px}.workorder-view .comments[data-v-04313ef6]{padding:10px}.workorder-view .comments .item[data-v-04313ef6]{display:-ms-flexbox;display:flex}.workorder-view .comments .item .avatar[data-v-04313ef6]{padding-top:10px;border-bottom:1px solid hsla(0,0%,62%,.13)}.workorder-view .comments .item .avatar img[data-v-04313ef6]{width:30px;height:30px;border-radius:100px;display:block}.workorder-view .comments .item .right[data-v-04313ef6]{padding:10px 5px;-ms-flex-positive:1;flex-grow:1;border-bottom:1px solid hsla(0,0%,62%,.13)}.workorder-view .comments .item .right .nickname[data-v-04313ef6]{font-size:15px;color:#333}.workorder-view .comments .item .right .detail[data-v-04313ef6]{font-size:15px;color:#333;margin-top:5px}.workorder-view .comments .item .right .date[data-v-04313ef6]{color:#999;font-size:14px;margin-top:5px}.workorder-view .comments .item:last-child .avatar[data-v-04313ef6],.workorder-view .comments .item:last-child .right[data-v-04313ef6]{border-bottom:0}.workorder-view .content-box[data-v-04313ef6]{width:600px;height:100%;background-color:#fff;position:fixed;right:0;left:260px;margin:0 auto;top:30px;overflow:hidden;border-radius:5px 5px 0 0;padding-top:40px;padding-bottom:135px;box-sizing:border-box}.workorder-view .content-box.padding-bottom30[data-v-04313ef6]{padding-bottom:30px}.workorder-view .content-box .content[data-v-04313ef6]{box-sizing:border-box;width:100%;padding:0 10px;height:100%;overflow:hidden;overflow-y:auto;padding-top:10px;position:relative;padding-bottom:20px}.workorder-view .content-box .file-view[data-v-04313ef6]{position:absolute;bottom:135px;left:0;right:0;padding:5px 10px;margin:0 auto;font-size:13px;color:#8bc34a}.workorder-view .content-box .file-view span[data-v-04313ef6]{display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center}.workorder-view .content-box .file-view span img[data-v-04313ef6]{width:20px;height:20px}.workorder-view .content-box .file-view span i[data-v-04313ef6]{font-style:normal;margin-left:5px}.workorder-view .content-box .input-form[data-v-04313ef6]{position:absolute;bottom:35px;left:0;right:0;margin:0 auto;width:100%;height:100px;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:10px 10px 0;box-sizing:border-box;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center}.workorder-view .content-box .input-form textarea[data-v-04313ef6]{height:90%;-ms-flex-positive:1;flex-grow:1;border-radius:0;border:0;color:#333;font-size:14px;resize:none}.workorder-view .content-box .input-form .icon-btn[data-v-04313ef6]{background:url(../img/upload.76668586.png) 50% no-repeat;background-size:30px;width:55px;height:55px;overflow:hidden}.workorder-view .content-box .input-form .icon-btn input[data-v-04313ef6]{display:block;width:100%;height:100%;font-size:100px;opacity:0}.workorder-view .content-box .title[data-v-04313ef6]{width:100%;height:40px;border-bottom:1px solid #ddd;position:absolute;top:0;left:0;background-color:#fff;padding:10px 0 0 10px;box-sizing:border-box}.workorder-view .content-box .buttons[data-v-04313ef6]{position:absolute;top:5px;right:50px}.workorder-view .content-box .close[data-v-04313ef6]{position:absolute;top:5px;right:5px;font-size:25px;color:#ccc;cursor:pointer}.workorder-view .content-box .form-line[data-v-04313ef6]{margin-bottom:5px;font-size:14px;color:#333;display:-ms-flexbox;display:flex}.workorder-view .content-box .form-line .lable[data-v-04313ef6]{width:50px;-ms-flex-negative:0;flex-shrink:0}.workorder-view .content-box .form-line .con[data-v-04313ef6]{-ms-flex-positive:1;flex-grow:1}.workorder-view .content-box .form-line img[data-v-04313ef6]{width:30%}.workorder-view.is-show-aside .content[data-v-04313ef6],.workorder-view.is-show-aside[data-v-04313ef6]{left:0}.me-head[data-v-28a53d25]{height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:20px;-ms-flex-pack:justify;justify-content:space-between;color:#666}.me-head i[data-v-28a53d25]{margin-right:5px}.container-box[data-v-28a53d25]{display:-ms-flexbox;display:flex}.container-box .menu[data-v-28a53d25]{-ms-flex-negative:0;flex-shrink:0;width:180px}.container-box .table-content[data-v-28a53d25]{-ms-flex-positive:1;flex-grow:1}
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type

4.35 KB | W: | H:

4.35 KB | W: | H:

public/admin/img/kefu_logo.9c308a55.png
public/admin/img/kefu_logo.9c308a55.png
public/admin/img/kefu_logo.9c308a55.png
public/admin/img/kefu_logo.9c308a55.png
  • 2-up
  • Swipe
  • Onion skin

237 KB | W: | H:

237 KB | W: | H:

public/admin/img/login_bg.8ba760be.jpg
public/admin/img/login_bg.8ba760be.jpg
public/admin/img/login_bg.8ba760be.jpg
public/admin/img/login_bg.8ba760be.jpg
  • 2-up
  • Swipe
  • Onion skin

23.4 KB | W: | H:

23.4 KB | W: | H:

public/admin/img/login_bg1.531e0c1c.jpg
public/admin/img/login_bg1.531e0c1c.jpg
public/admin/img/login_bg1.531e0c1c.jpg
public/admin/img/login_bg1.531e0c1c.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -47,4 +47,4 @@ ...@@ -47,4 +47,4 @@
} }
input:-ms-input-placeholder{ /* Internet Explorer 10-11 */ input:-ms-input-placeholder{ /* Internet Explorer 10-11 */
color:#ccc; color:#ccc;
}</style><link href=css/chunk-08473d3a.77daa9fe.css rel=prefetch><link href=css/chunk-3a5ae4b9.36eb5b7d.css rel=prefetch><link href=css/chunk-44f6e77d.96ac4fad.css rel=prefetch><link href=css/chunk-4bc425fc.a028419f.css rel=prefetch><link href=css/chunk-4d213a0b.e2ea152d.css rel=prefetch><link href=css/chunk-5c1245e5.acb5ca11.css rel=prefetch><link href=css/chunk-615380b5.0b5bbfe0.css rel=prefetch><link href=css/chunk-771e4186.92ee7235.css rel=prefetch><link href=css/chunk-b4735d10.9f747f60.css rel=prefetch><link href=css/chunk-d086e898.6a96c7a1.css rel=prefetch><link href=js/chunk-08473d3a.b8ea5cf2.js rel=prefetch><link href=js/chunk-343c8d41.f0041881.js rel=prefetch><link href=js/chunk-3a5ae4b9.95fb80dc.js rel=prefetch><link href=js/chunk-44f6e77d.2455bfe6.js rel=prefetch><link href=js/chunk-4bc425fc.0bbe4f9b.js rel=prefetch><link href=js/chunk-4d213a0b.fb158f44.js rel=prefetch><link href=js/chunk-5c1245e5.8e906d8e.js rel=prefetch><link href=js/chunk-615380b5.8e004b72.js rel=prefetch><link href=js/chunk-771e4186.f1240d97.js rel=prefetch><link href=js/chunk-b4735d10.e80c520c.js rel=prefetch><link href=js/chunk-d086e898.72fb38e4.js rel=prefetch><link href=css/app.ba710877.css rel=preload as=style><link href=css/chunk-vendors.cb739fea.css rel=preload as=style><link href=js/app.315b59ad.js rel=preload as=script><link href=js/chunk-vendors.420bd1eb.js rel=preload as=script><link href=css/chunk-vendors.cb739fea.css rel=stylesheet><link href=css/app.ba710877.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.420bd1eb.js></script><script src=js/app.315b59ad.js></script></body></html> }</style><link href=css/chunk-0673cf5f.70fac712.css rel=prefetch><link href=css/chunk-081fd645.c5547932.css rel=prefetch><link href=css/chunk-08473d3a.77daa9fe.css rel=prefetch><link href=css/chunk-1b20b679.bbe54d80.css rel=prefetch><link href=css/chunk-3a5ae4b9.36eb5b7d.css rel=prefetch><link href=css/chunk-43693859.1243ef48.css rel=prefetch><link href=css/chunk-4bc425fc.a028419f.css rel=prefetch><link href=css/chunk-4d213a0b.e2ea152d.css rel=prefetch><link href=css/chunk-688d1b8e.fd85133d.css rel=prefetch><link href=css/chunk-cabbc79c.036672e3.css rel=prefetch><link href=css/chunk-d086e898.6a96c7a1.css rel=prefetch><link href=js/chunk-0673cf5f.add337a2.js rel=prefetch><link href=js/chunk-081fd645.cbf6b703.js rel=prefetch><link href=js/chunk-08473d3a.230bbeeb.js rel=prefetch><link href=js/chunk-1b20b679.382e3755.js rel=prefetch><link href=js/chunk-343c8d41.f0041881.js rel=prefetch><link href=js/chunk-3a5ae4b9.95fb80dc.js rel=prefetch><link href=js/chunk-43693859.d666587e.js rel=prefetch><link href=js/chunk-4bc425fc.0bbe4f9b.js rel=prefetch><link href=js/chunk-4d213a0b.fb158f44.js rel=prefetch><link href=js/chunk-688d1b8e.764bf305.js rel=prefetch><link href=js/chunk-cabbc79c.8d69ea53.js rel=prefetch><link href=js/chunk-d086e898.fd9639b1.js rel=prefetch><link href=css/app.ba710877.css rel=preload as=style><link href=css/chunk-vendors.cb739fea.css rel=preload as=style><link href=js/app.bb3d4191.js rel=preload as=script><link href=js/chunk-vendors.420bd1eb.js rel=preload as=script><link href=css/chunk-vendors.cb739fea.css rel=stylesheet><link href=css/app.ba710877.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.420bd1eb.js></script><script src=js/app.bb3d4191.js></script></body></html>
\ No newline at end of file \ 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.
This diff could not be displayed because it is too large.
File mode changed
.container[data-v-6f1ffd80]{height:100vh;overflow:hidden;overflow-y:auto}.content[data-v-6f1ffd80]{padding-top:50px;padding-bottom:90px}.content .no-data[data-v-6f1ffd80]{color:#666;font-size:14px}.content .workorder-close[data-v-6f1ffd80]{text-align:center;color:#666;font-size:14px;padding:10px}.content.hide-header[data-v-6f1ffd80]{padding-top:0}.content .head[data-v-6f1ffd80]{margin:0 10px;padding:10px 0;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .head .con[data-v-6f1ffd80]{font-size:15px;color:#333;display:-ms-flexbox;display:flex;margin-bottom:8px}.content .head .con span[data-v-6f1ffd80]{-ms-flex-flow:1;flex-flow:1}.content .head .con span[data-v-6f1ffd80]:first-child{-ms-flex-flow:0;flex-flow:0;-ms-flex-negative:0;flex-shrink:0;width:45px}.content .head .con i[data-v-6f1ffd80]{font-style:normal}.content .comments[data-v-6f1ffd80]{padding:10px}.content .comments .item[data-v-6f1ffd80]{display:-ms-flexbox;display:flex}.content .comments .item .avatar[data-v-6f1ffd80]{padding-top:10px;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .comments .item .avatar img[data-v-6f1ffd80]{width:30px;height:30px;border-radius:100px;display:block}.content .comments .item .right[data-v-6f1ffd80]{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-6f1ffd80]{font-size:15px;color:#333}.content .comments .item .right .detail[data-v-6f1ffd80]{font-size:15px;color:#333;margin-top:5px}.content .comments .item .right .date[data-v-6f1ffd80]{color:#999;font-size:14px;margin-top:5px}.content .comments .item:last-child .avatar[data-v-6f1ffd80],.content .comments .item:last-child .right[data-v-6f1ffd80]{border-bottom:0}.content .file-view[data-v-6f1ffd80]{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-6f1ffd80]{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-6f1ffd80]{width:20px;height:20px}.content .file-view span i[data-v-6f1ffd80]{font-style:normal;margin-left:5px}.content .input-form[data-v-6f1ffd80]{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-6f1ffd80]{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-6f1ffd80]{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-6f1ffd80]{display:block;width:100%;height:100%;font-size:100px;opacity:0}.content .input-form .sub-btn[data-v-6f1ffd80]{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-6f1ffd80]:active{opacity:.8}
\ No newline at end of file
.container[data-v-ac0a42f8]{height:100vh;overflow:hidden;overflow-y:auto}.content[data-v-ac0a42f8]{padding-top:50px;padding-bottom:90px}.content .no-data[data-v-ac0a42f8]{color:#666;font-size:14px}.content .workorder-close[data-v-ac0a42f8]{text-align:center;color:#666;font-size:14px;padding:10px}.content.hide-header[data-v-ac0a42f8]{padding-top:0}.content .head[data-v-ac0a42f8]{margin:0 10px;padding:10px 0;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .head .con[data-v-ac0a42f8]{font-size:15px;color:#333;display:-ms-flexbox;display:flex;margin-bottom:8px}.content .head .con span[data-v-ac0a42f8]{-ms-flex-flow:1;flex-flow:1}.content .head .con span[data-v-ac0a42f8]:first-child{-ms-flex-flow:0;flex-flow:0;-ms-flex-negative:0;flex-shrink:0;width:45px}.content .head .con i[data-v-ac0a42f8]{font-style:normal}.content .comments[data-v-ac0a42f8]{padding:10px}.content .comments .item[data-v-ac0a42f8]{display:-ms-flexbox;display:flex}.content .comments .item .avatar[data-v-ac0a42f8]{padding-top:10px;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .comments .item .avatar img[data-v-ac0a42f8]{width:30px;height:30px;border-radius:100px;display:block}.content .comments .item .right[data-v-ac0a42f8]{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-ac0a42f8]{font-size:15px;color:#333}.content .comments .item .right .detail[data-v-ac0a42f8]{font-size:15px;color:#333;margin-top:5px}.content .comments .item .right .date[data-v-ac0a42f8]{color:#999;font-size:14px;margin-top:5px}.content .comments .item:last-child .avatar[data-v-ac0a42f8],.content .comments .item:last-child .right[data-v-ac0a42f8]{border-bottom:0}.content .file-view[data-v-ac0a42f8]{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-ac0a42f8]{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-ac0a42f8]{width:20px;height:20px}.content .file-view span i[data-v-ac0a42f8]{font-style:normal;margin-left:5px}.content .input-form[data-v-ac0a42f8]{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-ac0a42f8]{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-ac0a42f8]{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-ac0a42f8]{display:block;width:100%;height:100%;font-size:100px;opacity:0}.content .input-form .sub-btn[data-v-ac0a42f8]{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-ac0a42f8]:active{opacity:.8}
\ No newline at end of file
...@@ -43,4 +43,4 @@ ...@@ -43,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/chunk-2c568771.92feb802.css rel=prefetch><link href=css/chunk-5e6009ff.86cb9867.css rel=prefetch><link href=css/chunk-612d9b40.3daa63d4.css rel=prefetch><link href=css/chunk-9ec58ea8.5743221d.css rel=prefetch><link href=js/chunk-2c568771.a81203d3.js rel=prefetch><link href=js/chunk-5e6009ff.d7088d94.js rel=prefetch><link href=js/chunk-612d9b40.13a3a9bb.js rel=prefetch><link href=js/chunk-9ec58ea8.59b56ff9.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.a65684bc.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.a65684bc.js></script></body></html> }</style><link href=css/chunk-046fefd3.c3f39812.css rel=prefetch><link href=css/chunk-2c568771.92feb802.css rel=prefetch><link href=css/chunk-612d9b40.3daa63d4.css rel=prefetch><link href=css/chunk-963a14da.86cb9867.css rel=prefetch><link href=js/chunk-046fefd3.4711921f.js rel=prefetch><link href=js/chunk-2c568771.a81203d3.js rel=prefetch><link href=js/chunk-612d9b40.13a3a9bb.js rel=prefetch><link href=js/chunk-963a14da.2d59ffcb.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.9bd82821.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.9bd82821.js></script></body></html>
\ No newline at end of file \ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-046fefd3"],{"269c":function(t,e,o){t.exports=o.p+"img/fujian1.083cd8b7.png"},3818:function(t,e,o){"use strict";var s=o("cd19"),r=o.n(s);r.a},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",[t._v(t._s(t.typeName||"---"))])]),s("div",{staticClass:"con"},[s("span",[t._v("状态:")]),s("span",[1==t.workorder.status?s("i",{staticStyle:{color:"#8bc34a"}},[t._v("已回复")]):t._e(),3==t.workorder.status?s("i",{staticStyle:{color:"#ccc"}},[t._v("已结束")]):t._e(),0==t.workorder.status?s("i",{staticStyle:{color:"#FF9800"}},[t._v("待处理")]):t._e(),2==t.workorder.status?s("i",{staticStyle:{color:"#FF9800"}},[t._v("待回复")]):t._e()])])]),s("div",{staticClass:"comments"},[t.comments.length<=0?s("div",{staticClass:"no-data"},[t._v("暂无回复内容,请您耐心等待~")]):t._l(t.comments,(function(e,o){return[s("div",{key:o,staticClass:"item"},[s("div",{staticClass:"avatar"},[0==e.aid?s("img",{attrs:{src:t.userInfo.avatar||"http://qiniu.cmp520.com/avatar_degault_3.png",alt:""}}):s("img",{attrs:{src:e.a_avatar||"http://qiniu.cmp520.com/avatar_degault_3.png",alt:""}})]),s("div",{staticClass:"right"},[0==e.aid?s("div",{staticClass:"nickname"},[t._v("我")]):s("div",{staticClass:"nickname"},[t._v(t._s(e.a_nickname))]),s("div",{staticClass:"detail",domProps:{innerHTML:t._s(e.content)}}),s("div",{staticClass:"date"},[t._v(t._s(t.$formatDate(e.create_at)))])])])]})),3==t.workorder.status?s("div",{staticClass:"workorder-close"},[t._v("工单已结束~")]):t._e()],2),""!=t.request.source||t.isShowUploadLoading?s("div",{staticClass:"file-view"},[t.isShowUploadLoading?s("span",[s("img",{attrs:{src:o("cf1c"),alt:""}}),s("i",[t._v("上传中~")])]):s("span",[s("img",{attrs:{src:o("269c"),alt:""}}),s("i",[t._v("你已成功添加附件,重新上传可替换~")])])]):t._e(),3!=t.workorder.status?s("div",{staticClass:"input-form"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.request.content,expression:"request.content"}],attrs:{placeholder:"请输入内容~"},domProps:{value:t.request.content},on:{blur:function(e){return t.inputBlur()},input:function(e){e.target.composing||t.$set(t.request,"content",e.target.value)}}}),s("span",{staticClass:"icon-btn"},[s("input",{attrs:{title:"添加附件",type:"file",onclick:"this.value = null"},on:{change:t.uploadFile}})]),s("span",{staticClass:"sub-btn",on:{click:function(e){return t.reply()}}},[t._v("提交")])]):t._e()])],1)},r=[],n=(o("8e6e"),o("ac6a"),o("456d"),o("bd86")),a=o("2f62"),i=o("76a0"),c=o("bc3a"),l=o.n(c);function u(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,s)}return o}function d(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?u(Object(o),!0).forEach((function(e){Object(n["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var p={name:"workorder_detail",components:{},data:function(){return{isShowUploadLoading:!1,isSubmit:!1,workorder:{},comments:[],fileType:"",request:{source:"",content:""}}},computed:d({},Object(a["b"])(["isShowHeader","workorders","userInfo","workorderTypes","uploadToken"]),{typeName:function(){var t=this;try{return this.workorderTypes.filter((function(e){return e.id==t.workorder.tid}))[0].title}catch(e){return console.log(e),""}}}),created:function(){var t=this;document.title="工单详细";var e=this.$route.params.id;this.$store.commit("updateState",{isShowPageLoading:!0}),l.a.all([this.getWorkOrder(e),this.getComments(e)]).then(l.a.spread((function(){t.$store.commit("updateState",{isShowPageLoading:!1})})))},methods:{getWorkOrder:function(t){var e=this;return l.a.get("/public/workorder/"+t).then((function(t){e.workorder=t.data.data,setTimeout((function(){return e.$previewRefresh()}),200)})).catch((function(t){console.log(t)}))},getComments:function(t){var e=this;return l.a.get("/public/workorder/comments/"+t).then((function(t){null!=t.data.data&&(e.comments=t.data.data,setTimeout((function(){return e.$previewRefresh()}),200))})).catch((function(t){console.log(t)}))},reply:function(){var t=this,e=this.request.content+this.request.source;if(""!=e.trim()){if(!this.isSubmit){this.isSubmit=!0;var o=this.workorder.id;l.a.post("/public/workorder/reply",{wid:o,content:e}).then((function(e){t.isSubmit=!1,console.log(e),t.getComments(o),t.request={source:"",content:""},setTimeout((function(){var t=document.querySelector(".container").clientHeight,e=document.querySelector(".content").clientHeight;document.querySelector(".container").scrollTop=e-t+20}),500)})).catch((function(e){t.isSubmit=!1,console.log(e),Object(i["Toast"])({message:"提交失败~"})}))}}else Object(i["Toast"])({message:"请输入内容~"})},inputBlur:function(){setTimeout((function(){document.body.scrollTo=0,window.scrollTo(0,0)}),100)},uploadFile:function(t){var e=t.target,o=e.files[0];this.isShowUploadLoading=!0;var s=this;this.$uploadFile({file:o,secret:s.uploadToken.secret,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:45%' preview='1' src='"+o+"' />":(e="<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",e+="<a target='_blank' style='color: #2e9dfc;' href='"+o+"'>下载附件</a>"),s.request.source=e,Object(i["Toast"])({message:"上传成功~"})},fail:function(t){s.isShowUploadLoading=!1,t.response&&t.response.data&&Object(i["Toast"])({message:t.response.data.message})}})},close:function(){var t=this,e=this.workorder.id;i["MessageBox"].confirm("您确定关闭该工单吗?").then((function(){l.a.put("/public/workorder/close/"+e).then((function(o){console.log(o),Object(i["Toast"])({message:"工单已关闭~"}),t.getWorkOrder(e)})).catch((function(t){Object(i["Toast"])({message:"工单关闭失败~"}),console.log(t)}))}))},del:function(){var t=this,e=this.workorder.id;i["MessageBox"].confirm("您确定删除该工单吗?").then((function(){l.a.delete("/public/workorder/"+e).then((function(e){console.log(e),Object(i["Toast"])({message:"工单已删除~"}),setTimeout((function(){return t.$router.go(-1)}))})).catch((function(t){Object(i["Toast"])({message:"工单关闭失败~"}),console.log(t)}))}))}}},A=p,m=(o("3818"),o("2877")),g=Object(m["a"])(A,s,r,!1,null,"6f1ffd80",null);e["default"]=g.exports},cd19:function(t,e,o){},cf1c:function(t,e){t.exports="data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7"}}]);
//# sourceMappingURL=chunk-046fefd3.4711921f.js.map
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9ec58ea8"],{"0c51":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",[t._v(t._s(t.typeName||"---"))])]),s("div",{staticClass:"con"},[s("span",[t._v("状态:")]),s("span",[1==t.workorder.status?s("i",{staticStyle:{color:"#8bc34a"}},[t._v("已回复")]):t._e(),3==t.workorder.status?s("i",{staticStyle:{color:"#ccc"}},[t._v("已结束")]):t._e(),0==t.workorder.status?s("i",{staticStyle:{color:"#FF9800"}},[t._v("待处理")]):t._e(),2==t.workorder.status?s("i",{staticStyle:{color:"#FF9800"}},[t._v("待回复")]):t._e()])])]),s("div",{staticClass:"comments"},[t.comments.length<=0?s("div",{staticClass:"no-data"},[t._v("暂无回复内容,请您耐心等待~")]):t._l(t.comments,(function(e,o){return[s("div",{key:o,staticClass:"item"},[s("div",{staticClass:"avatar"},[0==e.aid?s("img",{attrs:{src:t.userInfo.avatar||"http://qiniu.cmp520.com/avatar_degault_3.png",alt:""}}):s("img",{attrs:{src:e.a_avatar||"http://qiniu.cmp520.com/avatar_degault_3.png",alt:""}})]),s("div",{staticClass:"right"},[0==e.aid?s("div",{staticClass:"nickname"},[t._v("我")]):s("div",{staticClass:"nickname"},[t._v(t._s(e.a_nickname))]),s("div",{staticClass:"detail",domProps:{innerHTML:t._s(e.content)}}),s("div",{staticClass:"date"},[t._v(t._s(t.$formatDate(e.create_at)))])])])]})),3==t.workorder.status?s("div",{staticClass:"workorder-close"},[t._v("工单已结束~")]):t._e()],2),""!=t.request.source||t.isShowUploadLoading?s("div",{staticClass:"file-view"},[t.isShowUploadLoading?s("span",[s("img",{attrs:{src:o("cf1c"),alt:""}}),s("i",[t._v("上传中~")])]):s("span",[s("img",{attrs:{src:o("269c"),alt:""}}),s("i",[t._v("你已成功添加附件,重新上传可替换~")])])]):t._e(),3!=t.workorder.status?s("div",{staticClass:"input-form"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.request.content,expression:"request.content"}],attrs:{placeholder:"请输入内容~"},domProps:{value:t.request.content},on:{blur:function(e){return t.inputBlur()},input:function(e){e.target.composing||t.$set(t.request,"content",e.target.value)}}}),s("span",{staticClass:"icon-btn"},[s("input",{attrs:{title:"添加附件",type:"file",onclick:"this.value = null"},on:{change:t.uploadFile}})]),s("span",{staticClass:"sub-btn",on:{click:function(e){return t.reply()}}},[t._v("提交")])]):t._e()])],1)},r=[],n=(o("8e6e"),o("ac6a"),o("456d"),o("bd86")),a=o("2f62"),i=o("76a0"),c=o("bc3a"),l=o.n(c);function u(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,s)}return o}function d(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?u(Object(o),!0).forEach((function(e){Object(n["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var p={name:"workorder_detail",components:{},data:function(){return{isShowUploadLoading:!1,isSubmit:!1,workorder:{},comments:[],fileType:"",request:{source:"",content:""}}},computed:d({},Object(a["b"])(["isShowHeader","workorders","userInfo","workorderTypes","uploadToken"]),{typeName:function(){var t=this;try{return this.workorderTypes.filter((function(e){return e.id==t.workorder.tid}))[0].title}catch(e){return console.log(e),""}}}),created:function(){var t=this;document.title="工单详细";var e=this.$route.params.id;this.$store.commit("updateState",{isShowPageLoading:!0}),l.a.all([this.getWorkOrder(e),this.getComments(e)]).then(l.a.spread((function(){t.$store.commit("updateState",{isShowPageLoading:!1})})))},methods:{getWorkOrder:function(t){var e=this;return l.a.get("/public/workorder/"+t).then((function(t){e.workorder=t.data.data,setTimeout((function(){return e.$previewRefresh()}),200)})).catch((function(t){console.log(t)}))},getComments:function(t){var e=this;return l.a.get("/public/workorder/comments/"+t).then((function(t){null!=t.data.data&&(e.comments=t.data.data,setTimeout((function(){return e.$previewRefresh()}),200))})).catch((function(t){console.log(t)}))},reply:function(){var t=this,e=this.request.content+this.request.source;if(""!=e.trim()){if(!this.isSubmit){this.isSubmit=!0;var o=this.workorder.id;l.a.post("/public/workorder/reply",{wid:o,content:e}).then((function(e){t.isSubmit=!1,console.log(e),t.getComments(o),t.request={source:"",content:""},setTimeout((function(){var t=document.querySelector(".container").clientHeight,e=document.querySelector(".content").clientHeight;document.querySelector(".container").scrollTop=e-t+20}),500)})).catch((function(e){t.isSubmit=!1,console.log(e),Object(i["Toast"])({message:"提交失败~"})}))}}else Object(i["Toast"])({message:"请输入内容~"})},inputBlur:function(){setTimeout((function(){document.body.scrollTo=0,window.scrollTo(0,0)}),100)},uploadFile:function(t){var e=t.target,o=e.files[0];this.isShowUploadLoading=!0;var s=this;this.$uploadFile({file:o,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:45%' preview='1' src='"+o+"' />":(e="<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",e+="<a target='_blank' style='color: #2e9dfc;' href='"+o+"'>下载附件</a>"),s.request.source=e,Object(i["Toast"])({message:"上传成功~"})},fail:function(t){s.isShowUploadLoading=!1,t.response&&t.response.data&&Object(i["Toast"])({message:t.response.data.message})}})},close:function(){var t=this,e=this.workorder.id;i["MessageBox"].confirm("您确定关闭该工单吗?").then((function(){l.a.put("/public/workorder/close/"+e).then((function(o){console.log(o),Object(i["Toast"])({message:"工单已关闭~"}),t.getWorkOrder(e)})).catch((function(t){Object(i["Toast"])({message:"工单关闭失败~"}),console.log(t)}))}))},del:function(){var t=this,e=this.workorder.id;i["MessageBox"].confirm("您确定删除该工单吗?").then((function(){l.a.delete("/public/workorder/"+e).then((function(e){console.log(e),Object(i["Toast"])({message:"工单已删除~"}),setTimeout((function(){return t.$router.go(-1)}))})).catch((function(t){Object(i["Toast"])({message:"工单关闭失败~"}),console.log(t)}))}))}}},A=p,m=(o("da20"),o("2877")),g=Object(m["a"])(A,s,r,!1,null,"ac0a42f8",null);e["default"]=g.exports},cf1c:function(t,e){t.exports="data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7"},da20:function(t,e,o){"use strict";var s=o("0c51"),r=o.n(s);r.a}}]);
//# sourceMappingURL=chunk-9ec58ea8.59b56ff9.js.map
\ No newline at end of file
...@@ -31,6 +31,11 @@ func routers(prefix string) *beego.Namespace { ...@@ -31,6 +31,11 @@ func routers(prefix string) *beego.Namespace {
beego.NSRouter("/read", &controllers.PublicController{}, "get:Read"), beego.NSRouter("/read", &controllers.PublicController{}, "get:Read"),
beego.NSRouter("/secret", &controllers.PublicController{}, "get:UploadSecret"), beego.NSRouter("/secret", &controllers.PublicController{}, "get:UploadSecret"),
beego.NSRouter("/activity", &controllers.PublicController{}, "get:LastActivity"), beego.NSRouter("/activity", &controllers.PublicController{}, "get:LastActivity"),
// compatible
beego.NSRouter("/activity/?:id", &controllers.PublicController{}, "get:LastActivity"),
beego.NSRouter("/clean_read/?:id", &controllers.PublicController{}, "get:CleanRead"),
beego.NSRouter("/company", &controllers.PublicController{}, "get:GetCompanyInfo"), beego.NSRouter("/company", &controllers.PublicController{}, "get:GetCompanyInfo"),
beego.NSRouter("/robot_info/:id", &controllers.PublicController{}, "get:RobotInfo"), beego.NSRouter("/robot_info/:id", &controllers.PublicController{}, "get:RobotInfo"),
beego.NSRouter("/clean_read", &controllers.PublicController{}, "get:CleanRead"), beego.NSRouter("/clean_read", &controllers.PublicController{}, "get:CleanRead"),
......
...@@ -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 */1 * * * *", func() error { checkOnLineTk := toolbox.NewTask("checkOnLine", "0 */5 * * * *", 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
......
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
this.upLastActivity() this.upLastActivity()
// 获取会话表 // 获取会话表
this.getContacts() setInterval(()=>this.getContacts(), 2000)
// Mimc 初始化 // Mimc 初始化
this.initMimc() this.initMimc()
......
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
</div> </div>
</el-badge> </el-badge>
</el-menu-item> </el-menu-item>
<el-menu-item index="/workorder"> <!-- <el-menu-item index="/workorder">
<el-badge :hidden="$store.getters.readCount == 0" :value="$store.getters.readCount" :max="99" style="width: 100%;"> <el-badge :hidden="$store.getters.readCount == 0" :value="$store.getters.readCount" :max="99" style="width: 100%;">
<div> <div>
<i class="el-icon-tickets"></i> <i class="el-icon-tickets"></i>
<span slot="title">工单管理</span> <span slot="title">工单管理</span>
</div> </div>
</el-badge> </el-badge>
</el-menu-item> </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>
...@@ -58,12 +58,12 @@ ...@@ -58,12 +58,12 @@
</el-menu-item> </el-menu-item>
</el-menu> </el-menu>
<div class="fix-bottom"> <!-- <div class="fix-bottom">
<a title="去给作者Star" target="_blank" href="https://github.com/chenxianqi/kefu_server.git"> <a title="去给作者Star" target="_blank" href="https://github.com/chenxianqi/kefu_server.git">
<svg class="github-logo" height="23" viewBox="0 0 16 16" version="1.1" width="23" aria-hidden="true"><path fill="#fff" fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg> <svg class="github-logo" height="23" viewBox="0 0 16 16" version="1.1" width="23" aria-hidden="true"><path fill="#fff" fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
<span> Github</span> <span> Github</span>
</a> </a>
</div> </div> -->
</el-aside> </el-aside>
</template> </template>
<script> <script>
......
...@@ -34,7 +34,7 @@ Helps.install = function (Vue, options) { ...@@ -34,7 +34,7 @@ Helps.install = function (Vue, options) {
} }
// 上传文件 // 上传文件
Vue.prototype.$uploadFile = function ({ mode, file, percent, success, fail }) { Vue.prototype.$uploadFile = function ({ mode,secret, file, percent, success, fail }) {
var qiniuObservable = null; var qiniuObservable = null;
const fileName = parseInt(Math.random() * 10000 * new Date().getTime()) + file.name.substr(file.name.lastIndexOf(".")); const fileName = parseInt(Math.random() * 10000 * new Date().getTime()) + file.name.substr(file.name.lastIndexOf("."));
// 系统内置 // 系统内置
...@@ -62,7 +62,7 @@ Helps.install = function (Vue, options) { ...@@ -62,7 +62,7 @@ Helps.install = function (Vue, options) {
const observable = qiniu.upload( const observable = qiniu.upload(
data.dist, data.dist,
fileName, fileName,
self.uploadToken.secret, secret,
{}, {},
{ {
mimeType: null mimeType: null
...@@ -78,7 +78,7 @@ Helps.install = function (Vue, options) { ...@@ -78,7 +78,7 @@ Helps.install = function (Vue, options) {
formData.append("fileType", "image"); formData.append("fileType", "image");
formData.append("fileName", "file"); formData.append("fileName", "file");
formData.append("key", fileName); formData.append("key", fileName);
formData.append("token", self.uploadToken.secret); formData.append("token", secret);
formData.append("file", file); formData.append("file", file);
axios axios
.post("https://upload.qiniup.com", formData) .post("https://upload.qiniup.com", formData)
......
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
messages: [], // 消息列表 messages: [], // 消息列表
isLoadMorEnd: false, // 是否已经到末尾 isLoadMorEnd: false, // 是否已经到末尾
userLocal: "", // 用户地理位置 userLocal: "", // 用户地理位置
AmapAPPKey: "", // 高德地图web appkey AmapAPPKey: "73ef1dc5c5ea086e7330b95aede42953", // 高德地图web appkey
isLoadMorLoading: false, // 是否在加装更多消息loading isLoadMorLoading: false, // 是否在加装更多消息loading
userInfo: {}, // 用户信息 userInfo: {}, // 用户信息
companyInfo: null, // 公司信息 companyInfo: null, // 公司信息
......
...@@ -193,14 +193,14 @@ ...@@ -193,14 +193,14 @@
<span class="expression-btn" @click="showEmoji = !showEmoji"> <span class="expression-btn" @click="showEmoji = !showEmoji">
<img src="../assets/expression.png" alt /> <img src="../assets/expression.png" alt />
</span> </span>
<span <!-- <span
class="workorder-btn" class="workorder-btn"
:class="{'show-header': !isShowHeader && isMobile}" :class="{'show-header': !isShowHeader && isMobile}"
@click="$router.push('/workorder')" @click="$router.push('/workorder')"
> >
<img src="../assets/workorder.png" /> <img src="../assets/workorder.png" />
<i>工单</i> <i>工单</i>
</span> </span> -->
<span <span
v-show="isMobile && !isShowHeader" v-show="isMobile && !isShowHeader"
@click="headRightBtn" @click="headRightBtn"
...@@ -291,6 +291,7 @@ export default { ...@@ -291,6 +291,7 @@ export default {
"userInfo", "userInfo",
"isSafari", "isSafari",
"isIOS", "isIOS",
"uploadToken",
"isJudgeBigScreen" "isJudgeBigScreen"
]) ])
}, },
...@@ -547,10 +548,10 @@ export default { ...@@ -547,10 +548,10 @@ export default {
cacheMsg.payload = self.uploadToken.host + "/" + fileName; cacheMsg.payload = self.uploadToken.host + "/" + fileName;
self.$previewRefresh(); self.$previewRefresh();
self.scrollIntoBottom(); self.scrollIntoBottom();
// 上传 // 上传
self.qiniuObservable = self.$uploadFile({ self.qiniuObservable = self.$uploadFile({
file, file,
secret: self.uploadToken.secret,
mode: self.uploadToken.mode, mode: self.uploadToken.mode,
// 七牛才会执行 // 七牛才会执行
percent(res) { percent(res) {
...@@ -592,6 +593,7 @@ export default { ...@@ -592,6 +593,7 @@ export default {
// 接收消息 // 接收消息
receiveP2PMsg(message) { receiveP2PMsg(message) {
console.log(message); console.log(message);
if(message.biz_type == "contacts") return
// 是否是转接客服消息 // 是否是转接客服消息
if (message.biz_type == "transfer") { if (message.biz_type == "transfer") {
this.$store.commit("updateState", { this.$store.commit("updateState", {
......
...@@ -208,6 +208,7 @@ export default { ...@@ -208,6 +208,7 @@ export default {
const self = this; const self = this;
this.$uploadFile({ this.$uploadFile({
file, file,
secret: self.uploadToken.secret,
mode: this.uploadToken.mode, mode: this.uploadToken.mode,
// 七牛才会执行 // 七牛才会执行
percent() {}, percent() {},
......
...@@ -26,29 +26,30 @@ func MessageInto(message models.Message) { ...@@ -26,29 +26,30 @@ func MessageInto(message models.Message) {
// content内容转base64 // content内容转base64
message.Payload = base64.StdEncoding.EncodeToString([]byte(message.Payload)) message.Payload = base64.StdEncoding.EncodeToString([]byte(message.Payload))
// UserRepository instance // 接收者是客服
userRepository := services.GetUserRepositoryInstance() admin := services.GetAdminRepositoryInstance().GetAdmin(message.ToAccount)
user := userRepository.GetUser(message.ToAccount)
// 接收者是用户 // 接收者是客服
if user != nil { if admin != nil {
// 默认已读消息 // 默认已读消息
message.Read = 0 message.Read = 0
user := userRepository.GetUser(message.ToAccount) if admin.Online == 0 || admin.CurrentConUser != message.FromAccount {
if user != nil && (user.Online == 0 || user.IsWindow == 0) {
message.Read = 1 message.Read = 1
} }
// 处理是否已回复
services.GetStatisticalRepositoryInstance().CheckIsReplyAndSetReply(user.ID, message.FromAccount, user.Platform)
} else { } else {
// 接收者是客服 // UserRepository instance
admin := services.GetAdminRepositoryInstance().GetAdmin(message.ToAccount) userRepository := services.GetUserRepositoryInstance()
if admin != nil && admin.CurrentConUser != message.FromAccount { user := userRepository.GetUser(message.ToAccount)
message.Read = 1 if user != nil {
message.Read = 0
if user.IsWindow == 0 {
message.Read = 1
}
// 处理是否已回复
services.GetStatisticalRepositoryInstance().CheckIsReplyAndSetReply(user.ID, message.FromAccount, user.Platform)
} }
} }
...@@ -97,9 +98,8 @@ func MessageInto(message models.Message) { ...@@ -97,9 +98,8 @@ func MessageInto(message models.Message) {
}) })
} }
if user != nil { // 接收者是客服就推送
PushNewContacts(message.FromAccount) if admin != nil {
} else {
PushNewContacts(message.ToAccount) PushNewContacts(message.ToAccount)
} }
......
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