diff --git a/bingchat/components/chatbox/index.js b/bingchat/components/chatbox/index.js index 2ead632..0e6b4a4 100644 --- a/bingchat/components/chatbox/index.js +++ b/bingchat/components/chatbox/index.js @@ -132,6 +132,18 @@ Component({ } }, }) + }, + showOriginContent: function (e) { + var index = e.currentTarget.dataset.index + var data = this.data.chatList[index] + if (data.showOrigin) { + data.showOrigin = null + } else { + data.showOrigin = true + } + this.setData({ + chatList: this.data.chatList + }) } }, }) diff --git a/bingchat/components/chatbox/index.wxml b/bingchat/components/chatbox/index.wxml index 5178573..9713aad 100644 --- a/bingchat/components/chatbox/index.wxml +++ b/bingchat/components/chatbox/index.wxml @@ -4,10 +4,10 @@ - + {{item.dt}}{{item.num_in_conversation}} - + {{item.originContent}} {{suggest}}