diff --git a/App.vue b/App.vue
index fd4eb54..5d3a189 100644
--- a/App.vue
+++ b/App.vue
@@ -10,18 +10,17 @@
export default {
onLaunch: function() {
console.log("App Launch");
- // #ifdef H5
+ // #ifndef APP
console.error(
- `暂时不支持运行到 Web,如果需要移动端的 Web 项目,参考 [H5 demo](https://github.com/openimsdk/openim-h5-demo)`
+ `暂时不支持运行到 Web或小程序端,如果需要移动端的 Web 项目,参考 [H5 demo](https://github.com/openimsdk/openim-h5-demo)`
);
return ;
// #endif
- // #ifdef MP-WEIXIN
- console.error(`暂时不支持运行到小程序端`);
- // #endif
+ // #ifdef APP
this.checkUpdate();
this.setGlobalIMlistener();
this.tryLogin();
+ // #endif
},
onShow: function() {
console.log("App Show");
@@ -80,7 +79,7 @@
uni.removeStorage({
key: "BusinessToken",
});
- uni.$u.route("/pages/login/index");
+ uni.$u.route("/pages/common/login/index");
});
};
IMSDK.subscribe(IMSDK.IMEvents.OnKickedOffline, (data) => {
diff --git a/components/User.vue b/components/User.vue
index 0a96b5a..af52013 100644
--- a/components/User.vue
+++ b/components/User.vue
@@ -15,7 +15,7 @@
const token = uni.getStorageSync('IMToken');
if (!token) {
uni.redirectTo({
- url: "/pages/login/index"
+ url: "/pages/common/login/index"
})
}
},
diff --git a/index.html b/index.html
index 31ff774..960e7d7 100644
--- a/index.html
+++ b/index.html
@@ -2,6 +2,8 @@
+
+
+
\ No newline at end of file
diff --git a/pages/login/index.vue b/pages/common/login/index.vue
similarity index 99%
rename from pages/login/index.vue
rename to pages/common/login/index.vue
index 16ac3e7..90f84d6 100644
--- a/pages/login/index.vue
+++ b/pages/common/login/index.vue
@@ -148,7 +148,7 @@ export default {
this.eying = !this.eying;
},
toRegisterOrForget(isRegister) {
- uni.$u.route("/pages/login/registerOrForget/index", {
+ uni.$u.route("/pages/login/common/index", {
isRegister,
});
},
diff --git a/pages/common/map.vue b/pages/common/map.vue
index 45d503a..e72f549 100644
--- a/pages/common/map.vue
+++ b/pages/common/map.vue
@@ -16,11 +16,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/pages/login/registerOrForget/index.vue b/pages/common/registerOrForget/index.vue
similarity index 97%
rename from pages/login/registerOrForget/index.vue
rename to pages/common/registerOrForget/index.vue
index 8aff063..42b00b2 100644
--- a/pages/login/registerOrForget/index.vue
+++ b/pages/common/registerOrForget/index.vue
@@ -98,7 +98,7 @@
uni.$u.toast("验证码已发送!");
setTimeout(
() =>
- uni.$u.route("/pages/login/verifyCode/index", {
+ uni.$u.route("/pages/common/verifyCode/index", {
userInfo: JSON.stringify(this.userInfo),
isRegister: this.isRegister,
}),
@@ -112,7 +112,7 @@
});
},
back() {
- uni.$u.route("/pages/login/index");
+ uni.$u.route("/pages/common/login/index");
},
showPicker() {
this.$refs.AreaPicker.init();
diff --git a/pages/login/setPassword/index.vue b/pages/common/setPassword/index.vue
similarity index 100%
rename from pages/login/setPassword/index.vue
rename to pages/common/setPassword/index.vue
diff --git a/pages/login/setSelfInfo/index.vue b/pages/common/setSelfInfo/index.vue
similarity index 98%
rename from pages/login/setSelfInfo/index.vue
rename to pages/common/setSelfInfo/index.vue
index 6edd631..2c4b8e3 100644
--- a/pages/login/setSelfInfo/index.vue
+++ b/pages/common/setSelfInfo/index.vue
@@ -147,7 +147,7 @@
} catch (err) {
console.log(err);
if(err.msg=="验证码过期" || err.msg=="验证码错误"){
- uni.$u.route("/pages/login/verifyCode/index", {
+ uni.$u.route("/pages/common/verifyCode/index", {
userInfo: JSON.stringify(this.userInfo),
isRegister: true,
resend: 1,
diff --git a/pages/login/verifyCode/index.vue b/pages/common/verifyCode/index.vue
similarity index 95%
rename from pages/login/verifyCode/index.vue
rename to pages/common/verifyCode/index.vue
index ce0280b..5d2ee18 100644
--- a/pages/login/verifyCode/index.vue
+++ b/pages/common/verifyCode/index.vue
@@ -61,7 +61,7 @@
onReady() {},
methods: {
back() {
- uni.$u.route("/pages/login/registerOrForget/index", {
+ uni.$u.route("/pages/login/common/index", {
isRegister: this.isRegister,
});
},
@@ -77,13 +77,13 @@
businessVerifyCode(options)
.then(() => {
if (this.isRegister) {
- uni.$u.route("/pages/login/setSelfInfo/index", {
+ uni.$u.route("/pages/common/setSelfInfo/index", {
userInfo: JSON.stringify(this.userInfo),
isRegister: this.isRegister,
codeValue: this.codeValue,
});
} else {
- uni.$u.route("/pages/login/setPassword/index", {
+ uni.$u.route("/pages/common/setPassword/index", {
userInfo: JSON.stringify(this.userInfo),
isRegister: !this.isRegister,
codeValue: this.codeValue,
diff --git a/pages/conversation/chating/components/ChatingFooter/CustomEditor.vue b/pages/conversation/chating/components/ChatingFooter/CustomEditor.vue
index 79725a1..d26f28f 100644
--- a/pages/conversation/chating/components/ChatingFooter/CustomEditor.vue
+++ b/pages/conversation/chating/components/ChatingFooter/CustomEditor.vue
@@ -1,193 +1,284 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/pages/conversation/chating/components/ChatingFooter/Recoder.vue b/pages/conversation/chating/components/ChatingFooter/Recoder.vue
index 28f6514..3eb1638 100644
--- a/pages/conversation/chating/components/ChatingFooter/Recoder.vue
+++ b/pages/conversation/chating/components/ChatingFooter/Recoder.vue
@@ -150,7 +150,7 @@
};
if (this.voiceCanSend) {
//console.log("=====上传语音文件,并发送语音信息====");
- this.$emit('RecodeEvent',{type:"sendVoiceMessage",audio:voiceFile})
+ this.$emit('RecodEvent',{type:"sendVoiceMessage",audio:voiceFile})
return;
} else {
console.log("=====已经取消发送语音信息====")
diff --git a/pages/conversation/chating/components/ChatingFooter/SimpleEditor.vue b/pages/conversation/chating/components/ChatingFooter/SimpleEditor.vue
index 2ca7f79..a7c3b65 100644
--- a/pages/conversation/chating/components/ChatingFooter/SimpleEditor.vue
+++ b/pages/conversation/chating/components/ChatingFooter/SimpleEditor.vue
@@ -59,21 +59,22 @@
this.textValue = e.detail.value;
// 更新光标位置
this.cursorPos = e.detail.cursor || this.textValue.length;
- this.$emit("input", {
- detail: {
- value: this.textValue,
- text: this.textValue,
- html: this.textValue // 简单编辑器,HTML 就是文本
- }
+ this.$emit("onUserEvent", {
+ "type":"input",
+ text: this.textValue,
+ html: this.textValue // 简单编辑器,HTML 就是文本
});
},
onFocus(e) {
- this.$emit("focus", e);
+ this.$emit("onUserEvent",{
+ type:"focus",
+ e
+ });
},
onBlur(e) {
// 保存光标位置
this.cursorPos = e.detail.cursor || this.textValue.length;
- this.$emit("blur", e);
+ this.$emit("onUserEvent",{type:"blur", e});
},
// 插入文本(表情或普通文本)
insertText(text, successFn, errFn) {
@@ -93,12 +94,10 @@
this.cursorPos = newCursorPos;
// 触发 input 事件
- this.$emit("input", {
- detail: {
- value: newText,
- text: newText,
- html: newText
- }
+ this.$emit("onUserEvent", {
+ type:"input",
+ html: newText,
+ text: newText,
});
// 使用 $nextTick 确保 DOM 更新后再设置光标
@@ -139,12 +138,10 @@
clear() {
this.textValue = "";
this.cursorPos = 0;
- this.$emit("input", {
- detail: {
- value: "",
- text: "",
- html: ""
- }
+ this.$emit("onUserEvent", {
+ type:"input",
+ text: "",
+ html: ""
});
},
// 删除(退格)
@@ -180,12 +177,10 @@
this.cursorPos = currentPos - deletedLength;
// 触发 input 事件
- this.$emit("input", {
- detail: {
- value: this.textValue,
- text: this.textValue,
- html: this.textValue
- }
+ this.$emit("onUserEvent", {
+ type:"input",
+ text: this.textValue,
+ html: this.textValue
});
// 使用 $nextTick 确保 DOM 更新后再设置光标
@@ -220,12 +215,12 @@
.simple_editor_textarea {
width: 100%;
- min-height: 30px;
+ min-height: 60rpx;
max-height: 120px;
+ line-height: 60rpx;
background-color: #fff;
- font-size: 14px;
- line-height: 1.5;
- padding: 4px;
+ font-size: 30rpx;
+ padding: 0 6rpx;
word-break: break-all;
box-sizing: border-box;
}
diff --git a/pages/conversation/chating/components/ChatingFooter/index.vue b/pages/conversation/chating/components/ChatingFooter/index.vue
index 5eddf70..6d53b26 100644
--- a/pages/conversation/chating/components/ChatingFooter/index.vue
+++ b/pages/conversation/chating/components/ChatingFooter/index.vue
@@ -5,15 +5,13 @@
-
+
+ @onUserEvent="onEditorEvent"
+ :value="inputHtml"/>