diff --git a/bingchat/app.js b/bingchat/app.js
index 037920c..25a4ca3 100644
--- a/bingchat/app.js
+++ b/bingchat/app.js
@@ -1,7 +1,8 @@
import { SERVER_HOST } from "config";
App({
- onShow: function () {},
+ onShow: function () {
+ },
onLaunch: function () {
this.getSid();
},
diff --git a/bingchat/app.json b/bingchat/app.json
index 1998d22..acfed0d 100644
--- a/bingchat/app.json
+++ b/bingchat/app.json
@@ -12,10 +12,11 @@
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTitleText": "New Bing Bot 🤖",
- "navigationBarTextStyle": "black"
+ "navigationBarTextStyle": "black"
},
"sitemapLocation": "sitemap.json",
"networkTimeout": {
"request": 1800000
- }
+ },
+ "resizable": true
}
diff --git a/bingchat/components/chatbox/index.wxml b/bingchat/components/chatbox/index.wxml
index c9c2c59..a0c6355 100644
--- a/bingchat/components/chatbox/index.wxml
+++ b/bingchat/components/chatbox/index.wxml
@@ -6,16 +6,22 @@
{{item.dt}}
- {{item.originContent}}
-
- {{suggest}}
-
+
+
+
+
+ {{item.originContent}}
+
+
+
+ {{suggest}}
+
{{item.dt}}
- {{item.originContent}}
+ {{item.originContent}}
diff --git a/bingchat/pages/index/index.js b/bingchat/pages/index/index.js
index 6d3a77a..4cd29b6 100644
--- a/bingchat/pages/index/index.js
+++ b/bingchat/pages/index/index.js
@@ -1,4 +1,14 @@
-import { SERVER_HOST } from "../../config";
+import {
+ SERVER_HOST
+} from "../../config";
+
+const systemInfo = wx.getSystemInfoSync()
+
+function inputPop() {
+ return systemInfo.platform == "ios" || systemInfo.platform == "android"
+}
+
+const initHeight = inputPop() ? 20 : 2
Date.prototype.format = function (fmt) {
var o = {
@@ -37,18 +47,21 @@ const personAvatar = "../../image/person.jpeg";
Page({
data: {
- InputBottom: 24,
+ InputBottom: initHeight,
content: "",
+ systemInfo: systemInfo
},
InputFocus(e) {
- this.setData({
- InputBottom: e.detail.height,
- });
+ if (inputPop()) {
+ this.setData({
+ InputBottom: e.detail.height,
+ });
+ }
},
InputBlur(e) {
this.setData({
- InputBottom: 24,
- });
+ InputBottom: initHeight,
+ });
},
processContent(content) {
return content.replace(/\\n/g, "\n");
@@ -71,6 +84,8 @@ Page({
});
}
},
+ onLoad() {
+ },
submitContent: function (content) {
var that = this;
const cht = app.globalData.cht;
@@ -116,7 +131,7 @@ Page({
}
wx.request({
url: SERVER_HOST + "/bing/chat",
- method: "POST",
+ method: "POST",
data: {
q: content,
t: new Date().getTime(),
diff --git a/bingchat/pages/index/index.wxml b/bingchat/pages/index/index.wxml
index 420ae49..b68d354 100644
--- a/bingchat/pages/index/index.wxml
+++ b/bingchat/pages/index/index.wxml
@@ -1,5 +1,5 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/bingchat/project.config.json b/bingchat/project.config.json
index 5acc0ff..c5ffeb4 100644
--- a/bingchat/project.config.json
+++ b/bingchat/project.config.json
@@ -1,7 +1,7 @@
{
"appid": "wxee7496be5b68b740",
"compileType": "miniprogram",
- "libVersion": "2.12.3",
+ "libVersion": "2.16.1",
"packOptions": {
"ignore": [],
"include": []
diff --git a/bingchat/project.private.config.json b/bingchat/project.private.config.json
index 2422f01..b31f0d7 100644
--- a/bingchat/project.private.config.json
+++ b/bingchat/project.private.config.json
@@ -5,5 +5,5 @@
"compileHotReLoad": true,
"urlCheck": false
},
- "libVersion": "2.15.0"
+ "libVersion": "2.16.1"
}
\ No newline at end of file