Showing
2 changed files
with
11 additions
and
1 deletions
1 | <div id="chat-main-wrap"> | 1 | <div id="chat-main-wrap"> |
2 | <!--im 头部--> | 2 | <!--im 头部--> |
3 | <header class="yoho-header chat-header"> | 3 | <header class="yoho-header chat-header"> |
4 | - <a href="{{#if backUrl}}{{backUrl}}{{^}}javascript:history.go(-1);{{/if}}" class="iconfont nav-back"></a> | 4 | + <a id="js-back" href="{{#if backUrl}}{{backUrl}}{{^}}javascript:history.go(-1);{{/if}}" class="iconfont nav-back"></a> |
5 | <div class="title">智能小YO</div> | 5 | <div class="title">智能小YO</div> |
6 | <div class="header-right"><span data-action="change-human">人工客服</span></div> | 6 | <div class="header-right"><span data-action="change-human">人工客服</span></div> |
7 | </header> | 7 | </header> |
@@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
6 | 6 | ||
7 | 'use strict'; | 7 | 'use strict'; |
8 | 8 | ||
9 | +import appBridge from 'yoho-app'; | ||
9 | import {time} from './time'; | 10 | import {time} from './time'; |
10 | import {api} from './store'; | 11 | import {api} from './store'; |
11 | import {RatingView, LeaveMSGView, OrderListView } from './view'; | 12 | import {RatingView, LeaveMSGView, OrderListView } from './view'; |
@@ -773,6 +774,15 @@ $('#chat-window').on('click', '.chat-image', function() { | @@ -773,6 +774,15 @@ $('#chat-window').on('click', '.chat-image', function() { | ||
773 | }); | 774 | }); |
774 | }); | 775 | }); |
775 | 776 | ||
777 | +if (appBridge.isApp) { | ||
778 | + $('#js-back').on('click', function(e) { | ||
779 | + e.preventDefault(); | ||
780 | + | ||
781 | + appBridge.invokeMethod('go.back', {}); | ||
782 | + }); | ||
783 | +} | ||
784 | + | ||
785 | + | ||
776 | 786 | ||
777 | window.$ = $; | 787 | window.$ = $; |
778 | window.chat = chat; | 788 | window.chat = chat; |
-
Please register or login to post a comment